markus / KCOM / Controls / AdornerFinal.xaml @ a1cc6e1f
이력 | 보기 | 이력해설 | 다운로드 (13.6 KB)
1 |
<UserControl
|
---|---|
2 |
x:Class="KCOM.Controls.AdornerFinal" |
3 |
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
4 |
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
5 |
xmlns:behavior="clr-namespace:KCOM.Common" |
6 |
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" |
7 |
xmlns:ei="http://schemas.microsoft.com/expression/2010/interactions" |
8 |
xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity" |
9 |
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" |
10 |
xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" |
11 |
d:DesignHeight="300" |
12 |
d:DesignWidth="400" |
13 |
mc:Ignorable="d"> |
14 |
<Canvas x:Name="LayoutRoot"> |
15 |
<Canvas.Resources>
|
16 |
<Style x:Key="ThumbMoveStyle" TargetType="Thumb"> |
17 |
<!--<Setter Property="Margin" Value="10" />-->
|
18 |
<Setter Property="Template"> |
19 |
<Setter.Value>
|
20 |
<ControlTemplate TargetType="Thumb"> |
21 |
<Grid>
|
22 |
<Rectangle
|
23 |
x:Name="RectThumb" |
24 |
Width="{TemplateBinding Width}" |
25 |
Height="{TemplateBinding Height}" |
26 |
Fill="#ffcfcfce" |
27 |
MouseLeftButtonDown="RectThumb_MouseLeftButtonDown" |
28 |
Opacity="0.6" |
29 |
Stroke="#ff6a6b68" |
30 |
StrokeDashArray="2 2" /> |
31 |
<telerik:RadDropDownButton
|
32 |
x:Name="Date_Drop" |
33 |
Width="{Binding ElementName=RectThumb, Path=Width}" |
34 |
Height="{Binding ElementName=RectThumb, Path=Height}" |
35 |
VerticalAlignment="Bottom" |
36 |
DropDownIndicatorVisibility="Collapsed" |
37 |
IsHitTestVisible="False" |
38 |
Loaded="RadDropDownButton_Loaded" |
39 |
Opacity="0.01"> |
40 |
<telerik:RadDropDownButton.DropDownContent>
|
41 |
<telerik:RadCalendar
|
42 |
x:Name="Date_Calendar" |
43 |
Width="{Binding ElementName=RectThumb, Path=Width}" |
44 |
Height="{Binding ElementName=RectThumb, Path=Height}" |
45 |
MinWidth="300" |
46 |
MinHeight="300" |
47 |
telerik:StyleManager.Theme="Windows8" |
48 |
Loaded="Date_Calendar_Loaded" /> |
49 |
</telerik:RadDropDownButton.DropDownContent>
|
50 |
</telerik:RadDropDownButton>
|
51 |
</Grid>
|
52 |
</ControlTemplate>
|
53 |
</Setter.Value>
|
54 |
</Setter>
|
55 |
</Style>
|
56 |
<Style x:Key="ThumbTextStyle" TargetType="Thumb"> |
57 |
<Setter Property="Width" Value="20" /> |
58 |
<Setter Property="Opacity" Value="0.7" /> |
59 |
<Setter Property="Height" Value="20" /> |
60 |
<Setter Property="Template"> |
61 |
<Setter.Value>
|
62 |
<ControlTemplate TargetType="Thumb"> |
63 |
<!--<TextBox Text="" x:Name="testText" Loaded="testText_Loaded" Width="{Binding Width, ElementName=Self}" Height="{Binding Height, ElementName=Self}"/>-->
|
64 |
<Rectangle
|
65 |
Width="{TemplateBinding Width}" |
66 |
Height="{TemplateBinding Height}" |
67 |
Fill="#ff8ef814" |
68 |
MouseLeftButtonDown="RectThumb_MouseLeftButtonDown" |
69 |
Opacity="0.6" /> |
70 |
</ControlTemplate>
|
71 |
</Setter.Value>
|
72 |
</Setter>
|
73 |
</Style>
|
74 |
<Style x:Key="ThumbResizeStyle" TargetType="Thumb"> |
75 |
<!--<Setter Property="Cursor" Value="None" />-->
|
76 |
<Setter Property="Margin" Value="-10" /> |
77 |
<Setter Property="Width" Value="20" /> |
78 |
<Setter Property="Cursor" Value="Hand" /> |
79 |
<Setter Property="Opacity" Value="1" /> |
80 |
<Setter Property="Height" Value="20" /> |
81 |
<Setter Property="Template"> |
82 |
<Setter.Value>
|
83 |
<ControlTemplate TargetType="Thumb"> |
84 |
<Ellipse
|
85 |
Width="16" |
86 |
Height="16" |
87 |
Margin="0,0,0,0" |
88 |
HorizontalAlignment="Center" |
89 |
Canvas.ZIndex="1" |
90 |
Stroke="#ff2e3436" |
91 |
StrokeThickness="2"> |
92 |
<Ellipse.Fill>
|
93 |
<SolidColorBrush Opacity="0.6" Color="#ff8ef814" /> |
94 |
</Ellipse.Fill>
|
95 |
<i:Interaction.Behaviors>
|
96 |
<behavior:ExpandingMouseOver ScaleFactor="2" /> |
97 |
</i:Interaction.Behaviors>
|
98 |
</Ellipse>
|
99 |
</ControlTemplate>
|
100 |
</Setter.Value>
|
101 |
</Setter>
|
102 |
|
103 |
</Style>
|
104 |
<Style x:Key="ThumbArcControlStyle" TargetType="Thumb"> |
105 |
<!--<Setter Property="Cursor" Value="None" />-->
|
106 |
<Setter Property="Margin" Value="-10" /> |
107 |
<Setter Property="Width" Value="20" /> |
108 |
<Setter Property="Opacity" Value="0.6" /> |
109 |
<Setter Property="Cursor" Value="Hand" /> |
110 |
<Setter Property="Height" Value="20" /> |
111 |
<Setter Property="Template"> |
112 |
<Setter.Value>
|
113 |
<ControlTemplate TargetType="Thumb"> |
114 |
<Ellipse
|
115 |
Width="20" |
116 |
Height="20" |
117 |
Margin="0,0,0,0" |
118 |
HorizontalAlignment="Center" |
119 |
Canvas.ZIndex="1" |
120 |
MouseLeftButtonDown="ControlPointMouseLeftButtonDown" |
121 |
Stroke="#ff2e3436" |
122 |
StrokeThickness="2"> |
123 |
<Ellipse.Fill>
|
124 |
<SolidColorBrush Opacity="0.6" Color="#fff814df" /> |
125 |
</Ellipse.Fill>
|
126 |
<i:Interaction.Behaviors>
|
127 |
<behavior:ExpandingMouseOver ScaleFactor="2" /> |
128 |
</i:Interaction.Behaviors>
|
129 |
</Ellipse>
|
130 |
</ControlTemplate>
|
131 |
</Setter.Value>
|
132 |
</Setter>
|
133 |
</Style>
|
134 |
<Style x:Key="ThumbResizeNoEdgeStyle" TargetType="Thumb"> |
135 |
<!--<Setter Property="Cursor" Value="None" />-->
|
136 |
<Setter Property="Width" Value="15" /> |
137 |
<Setter Property="Opacity" Value="0.7" /> |
138 |
<Setter Property="Height" Value="15" /> |
139 |
<Setter Property="Template"> |
140 |
<Setter.Value>
|
141 |
<ControlTemplate TargetType="Thumb"> |
142 |
<Border
|
143 |
Width="{TemplateBinding Width}" |
144 |
Height="{TemplateBinding Height}" |
145 |
Background="#FF312C2C" |
146 |
BorderBrush="Black" |
147 |
BorderThickness="1"> |
148 |
<Rectangle Fill="#ae8237f3" /> |
149 |
</Border>
|
150 |
</ControlTemplate>
|
151 |
</Setter.Value>
|
152 |
</Setter>
|
153 |
</Style>
|
154 |
<Style x:Key="ThumbRotateStyle" TargetType="Thumb"> |
155 |
<!--<Setter Property="Cursor" Value="None" />-->
|
156 |
<Setter Property="Margin" Value="-15" /> |
157 |
<Setter Property="Width" Value="30" /> |
158 |
<Setter Property="Height" Value="30" /> |
159 |
<Setter Property="Template"> |
160 |
<Setter.Value>
|
161 |
<ControlTemplate TargetType="Thumb"> |
162 |
<Border
|
163 |
Width="{TemplateBinding Width}" |
164 |
Height="{TemplateBinding Height}" |
165 |
Background="#FF312C2C" |
166 |
BorderBrush="Black" |
167 |
BorderThickness="1"> |
168 |
<Rectangle Fill="#FF07B4FF"> |
169 |
<i:Interaction.Behaviors>
|
170 |
<behavior:ExpandingMouseOver ScaleFactor="2" /> |
171 |
</i:Interaction.Behaviors>
|
172 |
</Rectangle>
|
173 |
</Border>
|
174 |
</ControlTemplate>
|
175 |
</Setter.Value>
|
176 |
</Setter>
|
177 |
</Style>
|
178 |
<Style x:Key="ThumbSingleRotateStyle" TargetType="Thumb"> |
179 |
<!--<Setter Property="Cursor" Value="None" />-->
|
180 |
<Setter Property="Margin" Value="-15" /> |
181 |
<Setter Property="Width" Value="20" /> |
182 |
<Setter Property="Height" Value="30" /> |
183 |
<Setter Property="Template"> |
184 |
<Setter.Value>
|
185 |
<ControlTemplate TargetType="Thumb"> |
186 |
<!--</Border>-->
|
187 |
<!--<Border Width="{TemplateBinding Width}" Height="{TemplateBinding Height}" BorderBrush="Black" Background="#FF312C2C" BorderThickness="1">-->
|
188 |
<StackPanel x:Name="RotateThumb"> |
189 |
<Ellipse
|
190 |
Width="16" |
191 |
Height="15" |
192 |
Margin="0,5,0,0" |
193 |
HorizontalAlignment="Center" |
194 |
Canvas.ZIndex="99" |
195 |
Fill="#ff18b7fc" |
196 |
Stroke="#ff2e3436" |
197 |
StrokeThickness="2"> |
198 |
<i:Interaction.Behaviors>
|
199 |
<behavior:ExpandingMouseOver ScaleFactor="1.5" /> |
200 |
</i:Interaction.Behaviors>
|
201 |
</Ellipse>
|
202 |
<Rectangle
|
203 |
Width="2" |
204 |
Height="40" |
205 |
HorizontalAlignment="Center" |
206 |
Canvas.ZIndex="99" |
207 |
Fill="#ff2e3436" /> |
208 |
</StackPanel>
|
209 |
</ControlTemplate>
|
210 |
</Setter.Value>
|
211 |
</Setter>
|
212 |
</Style>
|
213 |
</Canvas.Resources>
|
214 |
<Canvas
|
215 |
x:Name="ContainerContent" |
216 |
Background="Transparent" |
217 |
Canvas.ZIndex="82"> |
218 |
<!--<Thumb Style="{StaticResource ThumbArcControlStyle}"/>-->
|
219 |
<Thumb
|
220 |
x:Name="DragThumb" |
221 |
HorizontalAlignment="Stretch" |
222 |
VerticalAlignment="Stretch" |
223 |
BorderThickness="1" |
224 |
Canvas.ZIndex="100" |
225 |
DragCompleted="drag_DragCompleted" |
226 |
DragDelta="DragThumb_DragDelta" |
227 |
DragStarted="drag_DragStarted" |
228 |
Loaded="DragThumb_Loaded" |
229 |
MouseDoubleClick="DragThumb_MouseDoubleClick" |
230 |
Opacity="1" |
231 |
RenderTransformOrigin="0,0" |
232 |
Style="{StaticResource ThumbMoveStyle}"> |
233 |
<Thumb.RenderTransform>
|
234 |
<TransformGroup>
|
235 |
<!--<CompositeTransform x:Name="trRotate"/>-->
|
236 |
<RotateTransform x:Name="trRotateThumb" /> |
237 |
</TransformGroup>
|
238 |
</Thumb.RenderTransform>
|
239 |
</Thumb>
|
240 |
</Canvas>
|
241 |
<Grid
|
242 |
x:Name="AdornerBorder" |
243 |
Background="Transparent" |
244 |
Canvas.ZIndex="80" |
245 |
RenderTransformOrigin="0,0"> |
246 |
<Grid.RowDefinitions>
|
247 |
<RowDefinition Height="0" /> |
248 |
<RowDefinition /> |
249 |
<RowDefinition Height="0" /> |
250 |
</Grid.RowDefinitions>
|
251 |
<Grid.ColumnDefinitions>
|
252 |
<ColumnDefinition Width="0" /> |
253 |
<ColumnDefinition /> |
254 |
<ColumnDefinition Width="0" /> |
255 |
</Grid.ColumnDefinitions>
|
256 |
<Grid.RenderTransform>
|
257 |
<RotateTransform x:Name="trRotate" /> |
258 |
</Grid.RenderTransform>
|
259 |
<Thumb
|
260 |
x:Name="rotateTop" |
261 |
Grid.RowSpan="3" |
262 |
Grid.Column="1" |
263 |
Grid.ColumnSpan="3" |
264 |
Width="30" |
265 |
Height="30" |
266 |
Margin="0,-30" |
267 |
HorizontalAlignment="Stretch" |
268 |
VerticalAlignment="Top" |
269 |
Canvas.ZIndex="99" |
270 |
DragCompleted="rotate_DragCompleted" |
271 |
DragDelta="rotate_DragDelta" |
272 |
DragStarted="rotate_DragStarted" |
273 |
MouseMove="rotate_MouseMove" |
274 |
Style="{StaticResource ThumbSingleRotateStyle}" /> |
275 |
</Grid>
|
276 |
</Canvas>
|
277 |
</UserControl>
|