markus / KCOM / Controls / AdornerFinal.xaml @ 5c5e04cc
이력 | 보기 | 이력해설 | 다운로드 (13.6 KB)
1 | 1c1abe3b | taeseongkim | <UserControl
|
---|---|---|---|
2 | x:Class="KCOM.Controls.AdornerFinal" |
||
3 | xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
||
4 | 787a4489 | KangIngu | xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
5 | 1c1abe3b | taeseongkim | xmlns:behavior="clr-namespace:KCOM.Common" |
6 | 787a4489 | KangIngu | xmlns:d="http://schemas.microsoft.com/expression/blend/2008" |
7 | 1c1abe3b | taeseongkim | xmlns:ei="http://schemas.microsoft.com/expression/2010/interactions" |
8 | xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity" |
||
9 | 787a4489 | KangIngu | xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" |
10 | 1c1abe3b | taeseongkim | xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" |
11 | d:DesignHeight="300" |
||
12 | d:DesignWidth="400" |
||
13 | mc:Ignorable="d"> |
||
14 | 787a4489 | KangIngu | <Canvas x:Name="LayoutRoot"> |
15 | <Canvas.Resources>
|
||
16 | 1c1abe3b | taeseongkim | <Style x:Key="ThumbMoveStyle" TargetType="Thumb"> |
17 | 787a4489 | KangIngu | <!--<Setter Property="Margin" Value="10" />-->
|
18 | <Setter Property="Template"> |
||
19 | <Setter.Value>
|
||
20 | <ControlTemplate TargetType="Thumb"> |
||
21 | 1c1abe3b | taeseongkim | <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 | 787a4489 | KangIngu | <telerik:RadDropDownButton.DropDownContent>
|
41 | 1c1abe3b | taeseongkim | <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 | 787a4489 | KangIngu | </telerik:RadDropDownButton.DropDownContent>
|
50 | </telerik:RadDropDownButton>
|
||
51 | </Grid>
|
||
52 | </ControlTemplate>
|
||
53 | </Setter.Value>
|
||
54 | </Setter>
|
||
55 | </Style>
|
||
56 | 1c1abe3b | taeseongkim | <Style x:Key="ThumbTextStyle" TargetType="Thumb"> |
57 | 787a4489 | KangIngu | <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 | 1c1abe3b | taeseongkim | <!--<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 | 787a4489 | KangIngu | </ControlTemplate>
|
71 | </Setter.Value>
|
||
72 | </Setter>
|
||
73 | </Style>
|
||
74 | 1c1abe3b | taeseongkim | <Style x:Key="ThumbResizeStyle" TargetType="Thumb"> |
75 | 787a4489 | KangIngu | <!--<Setter Property="Cursor" Value="None" />-->
|
76 | <Setter Property="Margin" Value="-10" /> |
||
77 | <Setter Property="Width" Value="20" /> |
||
78 | 1c1abe3b | taeseongkim | <Setter Property="Cursor" Value="Hand" /> |
79 | 787a4489 | KangIngu | <Setter Property="Opacity" Value="1" /> |
80 | <Setter Property="Height" Value="20" /> |
||
81 | <Setter Property="Template"> |
||
82 | <Setter.Value>
|
||
83 | <ControlTemplate TargetType="Thumb"> |
||
84 | 1c1abe3b | taeseongkim | <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 | 787a4489 | KangIngu | <Ellipse.Fill>
|
93 | 1c1abe3b | taeseongkim | <SolidColorBrush Opacity="0.6" Color="#ff8ef814" /> |
94 | 787a4489 | KangIngu | </Ellipse.Fill>
|
95 | <i:Interaction.Behaviors>
|
||
96 | 1c1abe3b | taeseongkim | <behavior:ExpandingMouseOver ScaleFactor="2" /> |
97 | 787a4489 | KangIngu | </i:Interaction.Behaviors>
|
98 | </Ellipse>
|
||
99 | </ControlTemplate>
|
||
100 | </Setter.Value>
|
||
101 | </Setter>
|
||
102 | |||
103 | </Style>
|
||
104 | 1c1abe3b | taeseongkim | <Style x:Key="ThumbArcControlStyle" TargetType="Thumb"> |
105 | 787a4489 | KangIngu | <!--<Setter Property="Cursor" Value="None" />-->
|
106 | <Setter Property="Margin" Value="-10" /> |
||
107 | <Setter Property="Width" Value="20" /> |
||
108 | f513c215 | humkyung | <Setter Property="Opacity" Value="0.6" /> |
109 | 1c1abe3b | taeseongkim | <Setter Property="Cursor" Value="Hand" /> |
110 | 787a4489 | KangIngu | <Setter Property="Height" Value="20" /> |
111 | <Setter Property="Template"> |
||
112 | <Setter.Value>
|
||
113 | <ControlTemplate TargetType="Thumb"> |
||
114 | 1c1abe3b | taeseongkim | <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 | 787a4489 | KangIngu | <Ellipse.Fill>
|
124 | 1c1abe3b | taeseongkim | <SolidColorBrush Opacity="0.6" Color="#fff814df" /> |
125 | 787a4489 | KangIngu | </Ellipse.Fill>
|
126 | <i:Interaction.Behaviors>
|
||
127 | 1c1abe3b | taeseongkim | <behavior:ExpandingMouseOver ScaleFactor="2" /> |
128 | 787a4489 | KangIngu | </i:Interaction.Behaviors>
|
129 | </Ellipse>
|
||
130 | </ControlTemplate>
|
||
131 | </Setter.Value>
|
||
132 | </Setter>
|
||
133 | </Style>
|
||
134 | 1c1abe3b | taeseongkim | <Style x:Key="ThumbResizeNoEdgeStyle" TargetType="Thumb"> |
135 | 787a4489 | KangIngu | <!--<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 | 1c1abe3b | taeseongkim | <Border
|
143 | Width="{TemplateBinding Width}" |
||
144 | Height="{TemplateBinding Height}" |
||
145 | Background="#FF312C2C" |
||
146 | BorderBrush="Black" |
||
147 | BorderThickness="1"> |
||
148 | <Rectangle Fill="#ae8237f3" /> |
||
149 | 787a4489 | KangIngu | </Border>
|
150 | </ControlTemplate>
|
||
151 | </Setter.Value>
|
||
152 | </Setter>
|
||
153 | </Style>
|
||
154 | 1c1abe3b | taeseongkim | <Style x:Key="ThumbRotateStyle" TargetType="Thumb"> |
155 | 787a4489 | KangIngu | <!--<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 | 1c1abe3b | taeseongkim | <Border
|
163 | Width="{TemplateBinding Width}" |
||
164 | Height="{TemplateBinding Height}" |
||
165 | Background="#FF312C2C" |
||
166 | BorderBrush="Black" |
||
167 | BorderThickness="1"> |
||
168 | 787a4489 | KangIngu | <Rectangle Fill="#FF07B4FF"> |
169 | <i:Interaction.Behaviors>
|
||
170 | 1c1abe3b | taeseongkim | <behavior:ExpandingMouseOver ScaleFactor="2" /> |
171 | 787a4489 | KangIngu | </i:Interaction.Behaviors>
|
172 | </Rectangle>
|
||
173 | </Border>
|
||
174 | </ControlTemplate>
|
||
175 | </Setter.Value>
|
||
176 | </Setter>
|
||
177 | </Style>
|
||
178 | 1c1abe3b | taeseongkim | <Style x:Key="ThumbSingleRotateStyle" TargetType="Thumb"> |
179 | 787a4489 | KangIngu | <!--<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 | 1c1abe3b | taeseongkim | <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 | 787a4489 | KangIngu | <i:Interaction.Behaviors>
|
199 | 1c1abe3b | taeseongkim | <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 | 787a4489 | KangIngu | </StackPanel>
|
209 | </ControlTemplate>
|
||
210 | </Setter.Value>
|
||
211 | </Setter>
|
||
212 | </Style>
|
||
213 | </Canvas.Resources>
|
||
214 | 1c1abe3b | taeseongkim | <Canvas
|
215 | x:Name="ContainerContent" |
||
216 | Background="Transparent" |
||
217 | Canvas.ZIndex="82"> |
||
218 | 2089959a | taeseongkim | <!--<Thumb Style="{StaticResource ThumbArcControlStyle}"/>-->
|
219 | 1c1abe3b | taeseongkim | <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 | 787a4489 | KangIngu | <Thumb.RenderTransform>
|
234 | <TransformGroup>
|
||
235 | <!--<CompositeTransform x:Name="trRotate"/>-->
|
||
236 | 1c1abe3b | taeseongkim | <RotateTransform x:Name="trRotateThumb" /> |
237 | 787a4489 | KangIngu | </TransformGroup>
|
238 | </Thumb.RenderTransform>
|
||
239 | </Thumb>
|
||
240 | </Canvas>
|
||
241 | 1c1abe3b | taeseongkim | <Grid
|
242 | x:Name="AdornerBorder" |
||
243 | Background="Transparent" |
||
244 | Canvas.ZIndex="80" |
||
245 | RenderTransformOrigin="0,0"> |
||
246 | 787a4489 | KangIngu | <Grid.RowDefinitions>
|
247 | 1c1abe3b | taeseongkim | <RowDefinition Height="0" /> |
248 | <RowDefinition /> |
||
249 | <RowDefinition Height="0" /> |
||
250 | 787a4489 | KangIngu | </Grid.RowDefinitions>
|
251 | <Grid.ColumnDefinitions>
|
||
252 | 1c1abe3b | taeseongkim | <ColumnDefinition Width="0" /> |
253 | <ColumnDefinition /> |
||
254 | <ColumnDefinition Width="0" /> |
||
255 | 787a4489 | KangIngu | </Grid.ColumnDefinitions>
|
256 | <Grid.RenderTransform>
|
||
257 | 1c1abe3b | taeseongkim | <RotateTransform x:Name="trRotate" /> |
258 | 787a4489 | KangIngu | </Grid.RenderTransform>
|
259 | 1c1abe3b | taeseongkim | <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 | 787a4489 | KangIngu | </Grid>
|
276 | </Canvas>
|
||
277 | </UserControl> |