프로젝트

일반

사용자정보

개정판 1c1abe3b

ID1c1abe3b59a71dcb9f10c0fa8842d67c784783ab
상위 d7ee2793
하위 b84c78a8

김태성이(가) 4달 전에 추가함

issue #00000 DragThumb zindex 변경

Change-Id: I3073803cfef329bf653fa1f69c3d7caff39dee5c

차이점 보기:

KCOM/Controls/AdornerFinal.xaml
1
<UserControl x:Class="KCOM.Controls.AdornerFinal"
2
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
1
<UserControl
2
    x:Class="KCOM.Controls.AdornerFinal"
3
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
3 4
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
5
    xmlns:behavior="clr-namespace:KCOM.Common"
4 6
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
5
    xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" 
6
             xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity" 
7
    xmlns:ei="http://schemas.microsoft.com/expression/2010/interactions"
8
    xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
7 9
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
8
     xmlns:ei="http://schemas.microsoft.com/expression/2010/interactions"
9
    mc:Ignorable="d"  xmlns:behavior="clr-namespace:KCOM.Common"
10
    d:DesignHeight="300" d:DesignWidth="400">
10
    xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
11
    d:DesignHeight="300"
12
    d:DesignWidth="400"
13
    mc:Ignorable="d">
11 14
    <Canvas x:Name="LayoutRoot">
12 15
        <Canvas.Resources>
13
            <Style TargetType="Thumb" x:Key="ThumbMoveStyle">
16
            <Style x:Key="ThumbMoveStyle" TargetType="Thumb">
14 17
                <!--<Setter Property="Margin" Value="10" />-->
15 18
                <Setter Property="Template">
16 19
                    <Setter.Value>
17 20
                        <ControlTemplate TargetType="Thumb">
18
                            <Grid >
19
                                <Rectangle x:Name="RectThumb" Width="{TemplateBinding  Width}" Height="{TemplateBinding Height}" Fill="#ffcfcfce"  
20
                                           Opacity="0.6" Stroke="#ff6a6b68" StrokeDashArray="2 2" MouseLeftButtonDown="RectThumb_MouseLeftButtonDown">
21
                                </Rectangle>
22
                                <telerik:RadDropDownButton DropDownIndicatorVisibility="Collapsed" IsHitTestVisible="False" x:Name="Date_Drop" Opacity="0.01" 
23
                                                           Loaded="RadDropDownButton_Loaded" VerticalAlignment="Bottom"
24
                                                           Width="{Binding ElementName=RectThumb, Path=Width}" Height="{Binding ElementName=RectThumb, Path=Height}">
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">
25 40
                                    <telerik:RadDropDownButton.DropDownContent>
26
                                        <telerik:RadCalendar x:Name="Date_Calendar"  Width="{Binding ElementName=RectThumb, Path=Width}" 
27
                                                             MinHeight="300" MinWidth="300" telerik:StyleManager.Theme="Windows8"
28
                                                             Height="{Binding ElementName=RectThumb, Path=Height}" Loaded="Date_Calendar_Loaded"/>
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" />
29 49
                                    </telerik:RadDropDownButton.DropDownContent>
30 50
                                </telerik:RadDropDownButton>
31 51
                            </Grid>
......
33 53
                    </Setter.Value>
34 54
                </Setter>
35 55
            </Style>
36
            <Style TargetType="Thumb" x:Key="ThumbTextStyle">
56
            <Style x:Key="ThumbTextStyle" TargetType="Thumb">
37 57
                <Setter Property="Width" Value="20" />
38 58
                <Setter Property="Opacity" Value="0.7" />
39 59
                <Setter Property="Height" Value="20" />
40 60
                <Setter Property="Template">
41 61
                    <Setter.Value>
42 62
                        <ControlTemplate TargetType="Thumb">
43
                                <!--<TextBox Text="" x:Name="testText" Loaded="testText_Loaded"  Width="{Binding Width, ElementName=Self}" Height="{Binding Height, ElementName=Self}"/>-->
44
                                <Rectangle Fill="#ff8ef814" Width="{TemplateBinding Width}" Height="{TemplateBinding Height}"
45
        						    Opacity="0.6" MouseLeftButtonDown="RectThumb_MouseLeftButtonDown"/>                                
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" />
46 70
                        </ControlTemplate>
47 71
                    </Setter.Value>
48 72
                </Setter>
49 73
            </Style>
50
            <Style TargetType="Thumb" x:Key="ThumbResizeStyle">
74
            <Style x:Key="ThumbResizeStyle" TargetType="Thumb">
51 75
                <!--<Setter Property="Cursor" Value="None" />-->
52 76
                <Setter Property="Margin" Value="-10" />
53 77
                <Setter Property="Width" Value="20" />
54
                <Setter Property="Cursor" Value="Hand"/>
78
                <Setter Property="Cursor" Value="Hand" />
55 79
                <Setter Property="Opacity" Value="1" />
56 80
                <Setter Property="Height" Value="20" />
57 81
                <Setter Property="Template">
58 82
                    <Setter.Value>
59 83
                        <ControlTemplate TargetType="Thumb">
60
                            <Ellipse Stroke="#ff2e3436"  StrokeThickness="2"
61
                                     HorizontalAlignment="Center" Width="16"  Height="16" Margin="0,0,0,0" Canvas.ZIndex="1">
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">
62 92
                                <Ellipse.Fill>
63
                                    <SolidColorBrush Color="#ff8ef814" Opacity="0.6"/>
93
                                    <SolidColorBrush Opacity="0.6" Color="#ff8ef814" />
64 94
                                </Ellipse.Fill>
65 95
                                <i:Interaction.Behaviors>
66
                                    <behavior:ExpandingMouseOver ScaleFactor="2"/>
96
                                    <behavior:ExpandingMouseOver ScaleFactor="2" />
67 97
                                </i:Interaction.Behaviors>
68 98
                            </Ellipse>
69 99
                        </ControlTemplate>
......
71 101
                </Setter>
72 102

  
73 103
            </Style>
74
            <Style TargetType="Thumb" x:Key="ThumbArcControlStyle">
104
            <Style x:Key="ThumbArcControlStyle" TargetType="Thumb">
75 105
                <!--<Setter Property="Cursor" Value="None" />-->
76 106
                <Setter Property="Margin" Value="-10" />
77 107
                <Setter Property="Width" Value="20" />
78 108
                <Setter Property="Opacity" Value="0.6" />
79
                <Setter Property="Cursor" Value="Hand"/>
109
                <Setter Property="Cursor" Value="Hand" />
80 110
                <Setter Property="Height" Value="20" />
81 111
                <Setter Property="Template">
82 112
                    <Setter.Value>
83 113
                        <ControlTemplate TargetType="Thumb">
84
                            <Ellipse Stroke="#ff2e3436"  StrokeThickness="2" MouseLeftButtonDown="ControlPointMouseLeftButtonDown"
85
                                     HorizontalAlignment="Center" Width="20"  Height="20" Margin="0,0,0,0" Canvas.ZIndex="1">
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">
86 123
                                <Ellipse.Fill>
87
                                    <SolidColorBrush Color="#fff814df" Opacity="0.6"/>
124
                                    <SolidColorBrush Opacity="0.6" Color="#fff814df" />
88 125
                                </Ellipse.Fill>
89 126
                                <i:Interaction.Behaviors>
90
                                    <behavior:ExpandingMouseOver ScaleFactor="2"/>
127
                                    <behavior:ExpandingMouseOver ScaleFactor="2" />
91 128
                                </i:Interaction.Behaviors>
92 129
                            </Ellipse>
93 130
                        </ControlTemplate>
94 131
                    </Setter.Value>
95 132
                </Setter>
96 133
            </Style>
97
            <Style TargetType="Thumb" x:Key="ThumbResizeNoEdgeStyle">
134
            <Style x:Key="ThumbResizeNoEdgeStyle" TargetType="Thumb">
98 135
                <!--<Setter Property="Cursor" Value="None" />-->
99 136
                <Setter Property="Width" Value="15" />
100 137
                <Setter Property="Opacity" Value="0.7" />
......
102 139
                <Setter Property="Template">
103 140
                    <Setter.Value>
104 141
                        <ControlTemplate TargetType="Thumb">
105
                            <Border Width="{TemplateBinding Width}" Height="{TemplateBinding Height}" BorderBrush="Black" Background="#FF312C2C" BorderThickness="1">
106
                                <Rectangle Fill="#ae8237f3"/>
142
                            <Border
143
                                Width="{TemplateBinding Width}"
144
                                Height="{TemplateBinding Height}"
145
                                Background="#FF312C2C"
146
                                BorderBrush="Black"
147
                                BorderThickness="1">
148
                                <Rectangle Fill="#ae8237f3" />
107 149
                            </Border>
108 150
                        </ControlTemplate>
109 151
                    </Setter.Value>
110 152
                </Setter>
111 153
            </Style>
112
            <Style TargetType="Thumb" x:Key="ThumbRotateStyle">
154
            <Style x:Key="ThumbRotateStyle" TargetType="Thumb">
113 155
                <!--<Setter Property="Cursor" Value="None" />-->
114 156
                <Setter Property="Margin" Value="-15" />
115 157
                <Setter Property="Width" Value="30" />
......
117 159
                <Setter Property="Template">
118 160
                    <Setter.Value>
119 161
                        <ControlTemplate TargetType="Thumb">
120
                            <Border Width="{TemplateBinding Width}" Height="{TemplateBinding Height}" BorderBrush="Black" Background="#FF312C2C" BorderThickness="1">
162
                            <Border
163
                                Width="{TemplateBinding Width}"
164
                                Height="{TemplateBinding Height}"
165
                                Background="#FF312C2C"
166
                                BorderBrush="Black"
167
                                BorderThickness="1">
121 168
                                <Rectangle Fill="#FF07B4FF">
122 169
                                    <i:Interaction.Behaviors>
123
                                        <behavior:ExpandingMouseOver ScaleFactor="2"/>
170
                                        <behavior:ExpandingMouseOver ScaleFactor="2" />
124 171
                                    </i:Interaction.Behaviors>
125 172
                                </Rectangle>
126 173
                            </Border>
......
128 175
                    </Setter.Value>
129 176
                </Setter>
130 177
            </Style>
131
            <Style TargetType="Thumb" x:Key="ThumbSingleRotateStyle">
178
            <Style x:Key="ThumbSingleRotateStyle" TargetType="Thumb">
132 179
                <!--<Setter Property="Cursor" Value="None" />-->
133 180
                <Setter Property="Margin" Value="-15" />
134 181
                <Setter Property="Width" Value="20" />
......
139 186
                            <!--</Border>-->
140 187
                            <!--<Border Width="{TemplateBinding Width}" Height="{TemplateBinding Height}" BorderBrush="Black" Background="#FF312C2C" BorderThickness="1">-->
141 188
                            <StackPanel x:Name="RotateThumb">
142
                                <Ellipse Stroke="#ff2e3436" Fill="#ff18b7fc" StrokeThickness="2"
143
                        			HorizontalAlignment="Center" Width="16"  Height="15" Margin="0,5,0,0" Canvas.ZIndex="99">
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">
144 198
                                    <i:Interaction.Behaviors>
145
                                        <behavior:ExpandingMouseOver ScaleFactor="1.5"/>
146
                                    </i:Interaction.Behaviors></Ellipse>
147
                                <Rectangle Fill="#ff2e3436" Width="2"  Height="40" HorizontalAlignment="Center" Canvas.ZIndex="99"/>
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" />
148 208
                            </StackPanel>
149 209
                        </ControlTemplate>
150 210
                    </Setter.Value>
151 211
                </Setter>
152 212
            </Style>
153 213
        </Canvas.Resources>
154
        <Canvas x:Name="ContainerContent" Background="Transparent" Canvas.ZIndex="82">
214
        <Canvas
215
            x:Name="ContainerContent"
216
            Background="Transparent"
217
            Canvas.ZIndex="82">
155 218
            <!--<Thumb Style="{StaticResource ThumbArcControlStyle}"/>-->
156
            <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
                   DragDelta="DragThumb_DragDelta" Canvas.ZIndex="81" Style="{StaticResource ThumbMoveStyle}" RenderTransformOrigin="0,0">
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}">
159 233
                <Thumb.RenderTransform>
160 234
                    <TransformGroup>
161 235
                        <!--<CompositeTransform x:Name="trRotate"/>-->
162
                        <RotateTransform x:Name="trRotateThumb"/>
236
                        <RotateTransform x:Name="trRotateThumb" />
163 237
                    </TransformGroup>
164 238
                </Thumb.RenderTransform>
165 239
            </Thumb>
166 240
        </Canvas>
167
        <Grid x:Name="AdornerBorder" Background="Transparent" RenderTransformOrigin="0,0" Canvas.ZIndex="80">
241
        <Grid
242
            x:Name="AdornerBorder"
243
            Background="Transparent"
244
            Canvas.ZIndex="80"
245
            RenderTransformOrigin="0,0">
168 246
            <Grid.RowDefinitions>
169
                <RowDefinition Height="0"/>
170
                <RowDefinition/>
171
                <RowDefinition Height="0"/>
247
                <RowDefinition Height="0" />
248
                <RowDefinition />
249
                <RowDefinition Height="0" />
172 250
            </Grid.RowDefinitions>
173 251
            <Grid.ColumnDefinitions>
174
                <ColumnDefinition Width="0"/>
175
                <ColumnDefinition/>
176
                <ColumnDefinition Width="0"/>
252
                <ColumnDefinition Width="0" />
253
                <ColumnDefinition />
254
                <ColumnDefinition Width="0" />
177 255
            </Grid.ColumnDefinitions>
178 256
            <Grid.RenderTransform>
179
                <RotateTransform x:Name="trRotate"/>
257
                <RotateTransform x:Name="trRotate" />
180 258
            </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>
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}" />
186 275
        </Grid>
187 276
    </Canvas>
188 277
</UserControl>

내보내기 Unified diff

클립보드 이미지 추가 (최대 크기: 500 MB)