markus / KCOM / Controls / AdornerFinal.xaml @ 2c629eec
이력 | 보기 | 이력해설 | 다운로드 (11.4 KB)
1 | 787a4489 | KangIngu | <UserControl x:Class="KCOM.Controls.AdornerFinal" |
---|---|---|---|
2 | xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
||
3 | xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
||
4 | xmlns:d="http://schemas.microsoft.com/expression/blend/2008" |
||
5 | xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity" |
||
6 | xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" |
||
7 | xmlns:ei="http://schemas.microsoft.com/expression/2010/interactions" |
||
8 | mc:Ignorable="d" xmlns:behavior="clr-namespace:KCOM.Common" |
||
9 | d:DesignHeight="300" d:DesignWidth="400"> |
||
10 | <Canvas x:Name="LayoutRoot"> |
||
11 | <Canvas.Resources>
|
||
12 | <Style TargetType="Thumb" x:Key="ThumbMoveStyle"> |
||
13 | <!--<Setter Property="Margin" Value="10" />-->
|
||
14 | <Setter Property="Template"> |
||
15 | <Setter.Value>
|
||
16 | <ControlTemplate TargetType="Thumb"> |
||
17 | <Grid > |
||
18 | fa48eb85 | taeseongkim | <Rectangle x:Name="RectThumb" Width="{TemplateBinding Width}" Height="{TemplateBinding Height}" Fill="#ffcfcfce" |
19 | 787a4489 | KangIngu | Opacity="0.6" Stroke="#ff6a6b68" StrokeDashArray="2 2" MouseLeftButtonDown="RectThumb_MouseLeftButtonDown"> |
20 | </Rectangle>
|
||
21 | <telerik:RadDropDownButton DropDownIndicatorVisibility="Collapsed" IsHitTestVisible="False" x:Name="Date_Drop" Opacity="0.01" |
||
22 | Loaded="RadDropDownButton_Loaded" VerticalAlignment="Bottom" |
||
23 | Width="{Binding ElementName=RectThumb, Path=Width}" Height="{Binding ElementName=RectThumb, Path=Height}"> |
||
24 | <telerik:RadDropDownButton.DropDownContent>
|
||
25 | <telerik:RadCalendar x:Name="Date_Calendar" Width="{Binding ElementName=RectThumb, Path=Width}" |
||
26 | MinHeight="300" MinWidth="300" telerik:StyleManager.Theme="Windows8" |
||
27 | Height="{Binding ElementName=RectThumb, Path=Height}" Loaded="Date_Calendar_Loaded"/> |
||
28 | </telerik:RadDropDownButton.DropDownContent>
|
||
29 | </telerik:RadDropDownButton>
|
||
30 | </Grid>
|
||
31 | </ControlTemplate>
|
||
32 | </Setter.Value>
|
||
33 | </Setter>
|
||
34 | </Style>
|
||
35 | <Style TargetType="Thumb" x:Key="ThumbTextStyle"> |
||
36 | <Setter Property="Width" Value="20" /> |
||
37 | <Setter Property="Opacity" Value="0.7" /> |
||
38 | <Setter Property="Height" Value="20" /> |
||
39 | <Setter Property="Template"> |
||
40 | <Setter.Value>
|
||
41 | <ControlTemplate TargetType="Thumb"> |
||
42 | <!--<TextBox Text="" x:Name="testText" Loaded="testText_Loaded" Width="{Binding Width, ElementName=Self}" Height="{Binding Height, ElementName=Self}"/>-->
|
||
43 | 2089959a | taeseongkim | <Rectangle Fill="#ff8ef814" Width="{TemplateBinding Width}" Height="{TemplateBinding Height}" |
44 | 787a4489 | KangIngu | Opacity="0.6" MouseLeftButtonDown="RectThumb_MouseLeftButtonDown"/> |
45 | </ControlTemplate>
|
||
46 | </Setter.Value>
|
||
47 | </Setter>
|
||
48 | </Style>
|
||
49 | <Style TargetType="Thumb" x:Key="ThumbResizeStyle"> |
||
50 | <!--<Setter Property="Cursor" Value="None" />-->
|
||
51 | <Setter Property="Margin" Value="-10" /> |
||
52 | <Setter Property="Width" Value="20" /> |
||
53 | <Setter Property="Cursor" Value="Hand"/> |
||
54 | <Setter Property="Opacity" Value="1" /> |
||
55 | <Setter Property="Height" Value="20" /> |
||
56 | <Setter Property="Template"> |
||
57 | <Setter.Value>
|
||
58 | <ControlTemplate TargetType="Thumb"> |
||
59 | <Ellipse Stroke="#ff2e3436" StrokeThickness="2" |
||
60 | HorizontalAlignment="Center" Width="16" Height="16" Margin="0,0,0,0" Canvas.ZIndex="1"> |
||
61 | <Ellipse.Fill>
|
||
62 | <SolidColorBrush Color="#ff8ef814" Opacity="0.6"/> |
||
63 | </Ellipse.Fill>
|
||
64 | <i:Interaction.Behaviors>
|
||
65 | <behavior:ExpandingMouseOver ScaleFactor="2"/> |
||
66 | </i:Interaction.Behaviors>
|
||
67 | </Ellipse>
|
||
68 | </ControlTemplate>
|
||
69 | </Setter.Value>
|
||
70 | </Setter>
|
||
71 | |||
72 | </Style>
|
||
73 | <Style TargetType="Thumb" x:Key="ThumbArcControlStyle"> |
||
74 | <!--<Setter Property="Cursor" Value="None" />-->
|
||
75 | <Setter Property="Margin" Value="-10" /> |
||
76 | <Setter Property="Width" Value="20" /> |
||
77 | f513c215 | humkyung | <Setter Property="Opacity" Value="0.6" /> |
78 | 787a4489 | KangIngu | <Setter Property="Cursor" Value="Hand"/> |
79 | <Setter Property="Height" Value="20" /> |
||
80 | <Setter Property="Template"> |
||
81 | <Setter.Value>
|
||
82 | <ControlTemplate TargetType="Thumb"> |
||
83 | <Ellipse Stroke="#ff2e3436" StrokeThickness="2" MouseLeftButtonDown="ControlPointMouseLeftButtonDown" |
||
84 | HorizontalAlignment="Center" Width="20" Height="20" Margin="0,0,0,0" Canvas.ZIndex="1"> |
||
85 | <Ellipse.Fill>
|
||
86 | 2089959a | taeseongkim | <SolidColorBrush Color="#fff814df" Opacity="0.6"/> |
87 | 787a4489 | KangIngu | </Ellipse.Fill>
|
88 | <i:Interaction.Behaviors>
|
||
89 | <behavior:ExpandingMouseOver ScaleFactor="2"/> |
||
90 | </i:Interaction.Behaviors>
|
||
91 | </Ellipse>
|
||
92 | </ControlTemplate>
|
||
93 | </Setter.Value>
|
||
94 | </Setter>
|
||
95 | </Style>
|
||
96 | <Style TargetType="Thumb" x:Key="ThumbResizeNoEdgeStyle"> |
||
97 | <!--<Setter Property="Cursor" Value="None" />-->
|
||
98 | <Setter Property="Width" Value="15" /> |
||
99 | <Setter Property="Opacity" Value="0.7" /> |
||
100 | <Setter Property="Height" Value="15" /> |
||
101 | <Setter Property="Template"> |
||
102 | <Setter.Value>
|
||
103 | <ControlTemplate TargetType="Thumb"> |
||
104 | <Border Width="{TemplateBinding Width}" Height="{TemplateBinding Height}" BorderBrush="Black" Background="#FF312C2C" BorderThickness="1"> |
||
105 | <Rectangle Fill="#ae8237f3"/> |
||
106 | </Border>
|
||
107 | </ControlTemplate>
|
||
108 | </Setter.Value>
|
||
109 | </Setter>
|
||
110 | </Style>
|
||
111 | <Style TargetType="Thumb" x:Key="ThumbRotateStyle"> |
||
112 | <!--<Setter Property="Cursor" Value="None" />-->
|
||
113 | <Setter Property="Margin" Value="-15" /> |
||
114 | <Setter Property="Width" Value="30" /> |
||
115 | <Setter Property="Height" Value="30" /> |
||
116 | <Setter Property="Template"> |
||
117 | <Setter.Value>
|
||
118 | <ControlTemplate TargetType="Thumb"> |
||
119 | <Border Width="{TemplateBinding Width}" Height="{TemplateBinding Height}" BorderBrush="Black" Background="#FF312C2C" BorderThickness="1"> |
||
120 | <Rectangle Fill="#FF07B4FF"> |
||
121 | <i:Interaction.Behaviors>
|
||
122 | <behavior:ExpandingMouseOver ScaleFactor="2"/> |
||
123 | </i:Interaction.Behaviors>
|
||
124 | </Rectangle>
|
||
125 | </Border>
|
||
126 | </ControlTemplate>
|
||
127 | </Setter.Value>
|
||
128 | </Setter>
|
||
129 | </Style>
|
||
130 | <Style TargetType="Thumb" x:Key="ThumbSingleRotateStyle"> |
||
131 | <!--<Setter Property="Cursor" Value="None" />-->
|
||
132 | <Setter Property="Margin" Value="-15" /> |
||
133 | <Setter Property="Width" Value="20" /> |
||
134 | <Setter Property="Height" Value="30" /> |
||
135 | <Setter Property="Template"> |
||
136 | <Setter.Value>
|
||
137 | <ControlTemplate TargetType="Thumb"> |
||
138 | <!--</Border>-->
|
||
139 | <!--<Border Width="{TemplateBinding Width}" Height="{TemplateBinding Height}" BorderBrush="Black" Background="#FF312C2C" BorderThickness="1">-->
|
||
140 | <StackPanel x:Name="RotateThumb"> |
||
141 | <Ellipse Stroke="#ff2e3436" Fill="#ff18b7fc" StrokeThickness="2" |
||
142 | HorizontalAlignment="Center" Width="16" Height="15" Margin="0,5,0,0" Canvas.ZIndex="99"> |
||
143 | <i:Interaction.Behaviors>
|
||
144 | <behavior:ExpandingMouseOver ScaleFactor="1.5"/> |
||
145 | </i:Interaction.Behaviors>
|
||
146 | </Ellipse>
|
||
147 | <Rectangle Fill="#ff2e3436" Width="2" Height="40" HorizontalAlignment="Center" Canvas.ZIndex="99"/> |
||
148 | </StackPanel>
|
||
149 | </ControlTemplate>
|
||
150 | </Setter.Value>
|
||
151 | </Setter>
|
||
152 | </Style>
|
||
153 | </Canvas.Resources>
|
||
154 | <Canvas x:Name="ContainerContent" Background="Transparent" Canvas.ZIndex="82"> |
||
155 | 2089959a | taeseongkim | <!--<Thumb Style="{StaticResource ThumbArcControlStyle}"/>-->
|
156 | 787a4489 | KangIngu | <Thumb x:Name="DragThumb" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" BorderThickness="1" Opacity="1" |
157 | DragStarted="drag_DragStarted" DragCompleted="drag_DragCompleted" Loaded="DragThumb_Loaded" MouseDoubleClick="DragThumb_MouseDoubleClick" |
||
158 | 992a98b4 | KangIngu | DragDelta="DragThumb_DragDelta" Canvas.ZIndex="81" Style="{StaticResource ThumbMoveStyle}" RenderTransformOrigin="0,0"> |
159 | 787a4489 | KangIngu | <Thumb.RenderTransform>
|
160 | <TransformGroup>
|
||
161 | <!--<CompositeTransform x:Name="trRotate"/>-->
|
||
162 | <RotateTransform x:Name="trRotateThumb"/> |
||
163 | </TransformGroup>
|
||
164 | </Thumb.RenderTransform>
|
||
165 | </Thumb>
|
||
166 | </Canvas>
|
||
167 | 992a98b4 | KangIngu | <Grid x:Name="AdornerBorder" Background="Transparent" RenderTransformOrigin="0,0" Canvas.ZIndex="80"> |
168 | 787a4489 | KangIngu | <Grid.RowDefinitions>
|
169 | <RowDefinition Height="0"/> |
||
170 | <RowDefinition/> |
||
171 | <RowDefinition Height="0"/> |
||
172 | </Grid.RowDefinitions>
|
||
173 | <Grid.ColumnDefinitions>
|
||
174 | <ColumnDefinition Width="0"/> |
||
175 | <ColumnDefinition/> |
||
176 | <ColumnDefinition Width="0"/> |
||
177 | </Grid.ColumnDefinitions>
|
||
178 | <Grid.RenderTransform>
|
||
179 | <RotateTransform x:Name="trRotate"/> |
||
180 | </Grid.RenderTransform>
|
||
181 | <Thumb x:Name="rotateTop" Style="{StaticResource ThumbSingleRotateStyle}" Grid.Column="1" HorizontalAlignment="Stretch" |
||
182 | VerticalAlignment="Top" Margin="0,-30" Grid.ColumnSpan="3" Grid.RowSpan="3" Canvas.ZIndex="99" |
||
183 | Width="30" Height="30" DragStarted="rotate_DragStarted" MouseMove="rotate_MouseMove" DragDelta="rotate_DragDelta" |
||
184 | DragCompleted="rotate_DragCompleted"> |
||
185 | </Thumb>
|
||
186 | </Grid>
|
||
187 | </Canvas>
|
||
188 | </UserControl> |