forked from snoopwpf/snoopwpf
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ZoomerControl.xaml
55 lines (53 loc) · 1.4 KB
/
ZoomerControl.xaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
<!--
(c) Copyright Cory Plotts.
This source is subject to the Microsoft Public License (Ms-PL).
Please see http:https://go.microsoft.com/fwlink/?LinkID=131993 for details.
All other rights reserved.
-->
<UserControl
x:Class="Snoop.ZoomerControl"
xmlns="http:https://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http:https://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http:https://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http:https://schemas.microsoft.com/expression/blend/2008"
mc:Ignorable="d"
Focusable="True"
xmlns:xv="clr-namespace:Snoop"
d:DesignWidth="300"
d:DesignHeight="300"
>
<Grid
x:Name="DocumentRoot"
Focusable="True"
ClipToBounds="True"
Mouse.MouseDown="Content_MouseDown"
Mouse.MouseMove="Content_MouseMove"
Mouse.MouseUp="Content_MouseUp"
>
<Grid.Background>
<Binding ElementName="ColorSlider" Path="Value">
<Binding.Converter>
<xv:DoubleToWhitenessConverter/>
</Binding.Converter>
</Binding>
</Grid.Background>
<Viewbox x:Name="Viewbox"/>
<Slider
x:Name="ColorSlider"
Width="100"
HorizontalAlignment="Right"
VerticalAlignment="Top"
Margin="0,2,2,0"
Minimum="0"
Maximum="1"
Value=".75"
Opacity=".5"
Cursor="Arrow"
Focusable="False"
>
<Slider.ToolTip>
<TextBlock Style="{x:Null}" Text="Use this slider to adjust the Background from white to black."/>
</Slider.ToolTip>
</Slider>
</Grid>
</UserControl>