프로젝트

일반

사용자정보

통계
| 브랜치(Branch): | 개정판:

markus / KCOM / Controls / Symbol.xaml @ a9a82876

이력 | 보기 | 이력해설 | 다운로드 (16.2 KB)

1 f1f822e9 taeseongkim
<UserControl
2
    x:Class="KCOM.Controls.Symbol"
3
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
4
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
5
    xmlns:Behaviors="clr-namespace:KCOM.Behaviors"
6
    xmlns:WrapPanel="[WrapPanel ]clr-namespace:KCOM.WrapPanel"
7
    xmlns:ZoomAndPan="clr-namespace:ZoomAndPan;assembly=ZoomAndPan"
8
    xmlns:common="clr-namespace:KCOM.Common"
9
    xmlns:converter="clr-namespace:KCOM.Common.Converter"
10
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
11
    xmlns:dragDrop="clr-namespace:Telerik.Windows.Controls.DragDrop;assembly=Telerik.Windows.Controls"
12
    xmlns:local="clr-namespace:KCOM.Controls"
13
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
14
    xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
15
    xmlns:telerikDragDrop="clr-namespace:Telerik.Windows.DragDrop;assembly=Telerik.Windows.Controls"
16
    d:DesignHeight="900"
17
    d:DesignWidth="300"
18
    Background="#f5f5f5"
19
    mc:Ignorable="d">
20 787a4489 KangIngu
    <UserControl.Resources>
21 f1f822e9 taeseongkim
        <converter:SvgImageConverter x:Key="SvgImageConverter" />
22
        <Style
23
            x:Key="CustomDragVisualStyle2"
24
            BasedOn="{StaticResource DragVisualStyle}"
25
            TargetType="telerik:DragVisual">
26 f65e6c02 taeseongkim
            <Setter Property="Background" Value="Transparent" />
27
            <Setter Property="BorderThickness" Value="0" />
28 f1f822e9 taeseongkim
            <Setter Property="Margin" Value="0" />
29
            <Setter Property="Padding" Value="0" />
30 f65e6c02 taeseongkim
        </Style>
31 f1f822e9 taeseongkim
        <Style BasedOn="{StaticResource RadListBoxItemStyle}" TargetType="telerik:RadListBoxItem">
32
            <Setter Property="telerik:DragDropManager.AllowCapturedDrag" Value="True" />
33 f65e6c02 taeseongkim
            <!--<Setter Property="telerik:TouchManager.DragStartTrigger" Value="TapHoldAndMove"/>-->
34
        </Style>
35 8e5a4a6a taeseongkim
        <DataTemplate x:Key="SymbolTemplate_Private">
36 f1f822e9 taeseongkim
            <StackPanel
37
                AllowDrop="False"
38
                MouseLeave="StackPanel_MouseLeave"
39
                MouseLeftButtonDown="Move_Symbol"
40
                MouseUp="StackPanel_MouseUp"
41
                ToolTipService.ToolTip="{Binding Name}">
42 787a4489 KangIngu
                <Grid>
43
                    <StackPanel>
44 5ce56a3a KangIngu
                        <!--<Border Background="#FF1FA3EB">-->
45
                        <Border Background="#FF2A579A">
46 f1f822e9 taeseongkim
                            <TextBox
47
                                x:Name="symbolName"
48
                                MaxWidth="200"
49
                                HorizontalAlignment="Center"
50
                                VerticalAlignment="Center"
51
                                Background="#FF2A579A"
52
                                BorderBrush="#FF2A579A"
53
                                Foreground="White"
54
                                KeyDown="OnKeyDownHandler"
55
                                Text="{Binding Name}" />
56 787a4489 KangIngu
                        </Border>
57 f1f822e9 taeseongkim
                        <Image
58
                            x:Name="symbolImage"
59
                            Width="200"
60 8e5a4a6a taeseongkim
                            Height="64"
61
                            Margin="3"
62
                            HorizontalAlignment="Center"
63 3b938959 taeseongkim
                            Source="{Binding ImageUri, Converter={StaticResource SvgImageConverter}, IsAsync=True}" />
64 787a4489 KangIngu
                    </StackPanel>
65 f1f822e9 taeseongkim
                    <Rectangle
66
                        Opacity="0.7"
67
                        Stroke="#ff6c6d6d"
68
                        StrokeThickness="1" />
69 787a4489 KangIngu
                </Grid>
70
            </StackPanel>
71
        </DataTemplate>
72
    </UserControl.Resources>
73 f1f822e9 taeseongkim
    <Grid Margin="10">
74
        <telerik:RadTabControl
75
            x:Name="RadTab"
76
            HorizontalAlignment="Stretch"
77
            HorizontalContentAlignment="Stretch"
78
            telerik:StyleManager.Theme="Office2016"
79
            BorderThickness="0"
80
            FontSize="10"
81
            HeaderBackground="#f5f5f5"
82
            PreviewSelectionChanged="RadTabControl_PreviewSelectionChanged"
83
            ScrollViewer.HorizontalScrollBarVisibility="Disabled"
84
            SelectedIndex="0">
85 53880c83 ljiyeon
86 f1f822e9 taeseongkim
            <telerik:RadTabItem
87
                FontSize="10"
88
                FontWeight="Bold"
89
                Header="Private"
90
                HeaderForeground="{DynamicResource KCOMColor_MarkerBrush}">
91 5ce56a3a KangIngu
                <Grid>
92
                    <Grid.RowDefinitions>
93 f1f822e9 taeseongkim
                        <RowDefinition Height="Auto" />
94
                        <RowDefinition Height="Auto" />
95
                        <RowDefinition Height="*" />
96 5ce56a3a KangIngu
                    </Grid.RowDefinitions>
97 53880c83 ljiyeon
98 5ce56a3a KangIngu
                    <StackPanel Grid.Row="0" Orientation="Vertical">
99
                        <Grid Margin="0,10">
100
                            <Grid.ColumnDefinitions>
101 f1f822e9 taeseongkim
                                <ColumnDefinition Width="3*" />
102
                                <ColumnDefinition Width="3*" />
103
                                <ColumnDefinition Width="3*" />
104
                                <ColumnDefinition Width="3*" />
105 5ce56a3a KangIngu
                            </Grid.ColumnDefinitions>
106 f1f822e9 taeseongkim
                            <Button
107
                                Grid.Column="0"
108
                                Margin="5,0,0,0"
109
                                Padding="5"
110
                                Background="#3d3d3d"
111
                                Click="Place_Symbol"
112
                                Content="Place"
113
                                FontWeight="Normal"
114
                                Foreground="White" />
115
                            <Button
116
                                Grid.Column="1"
117
                                Margin="5,0,0,0"
118
                                Padding="5"
119
                                Background="#3d3d3d"
120
                                Click="Image_Place_Register"
121
                                Content="Capture"
122
                                FontWeight="Normal"
123
                                Foreground="White" />
124
                            <Button
125
                                Grid.Column="2"
126
                                Margin="5,0,0,0"
127
                                Padding="5"
128
                                Background="#3d3d3d"
129
                                Click="Create_Symbol"
130
                                Content="Register"
131
                                FontWeight="Normal"
132
                                Foreground="White" />
133 53880c83 ljiyeon
                            <!-- <Button Content="Rename"    Grid.Column="2" Click="Rename_Symbol" Margin="5,0,0,0" FontWeight="Normal" Padding="5" Background="#3d3d3d" Foreground="White"/> -->
134 f1f822e9 taeseongkim
135
                            <Button
136
                                Grid.Column="3"
137
                                Margin="5,0,0,0"
138
                                Padding="5"
139
                                Background="#3d3d3d"
140
                                Click="Remove_Symbol"
141
                                Content="Remove"
142
                                FontWeight="Normal"
143
                                Foreground="White" />
144 5ce56a3a KangIngu
                        </Grid>
145 53880c83 ljiyeon
                        <Grid Margin="0,0,0,10">
146 702abd98 humkyung
                            <Grid.ColumnDefinitions>
147 f1f822e9 taeseongkim
                                <ColumnDefinition Width="*" />
148 53880c83 ljiyeon
                            </Grid.ColumnDefinitions>
149 f1f822e9 taeseongkim
                            <TextBlock
150
                                Grid.Column="0"
151
                                HorizontalAlignment="Right"
152
                                VerticalAlignment="Center"
153
                                FontSize="10"
154
                                Text="[Tip : Double Click]" />
155 702abd98 humkyung
                        </Grid>
156 5ce56a3a KangIngu
                    </StackPanel>
157 f1f822e9 taeseongkim
                    <ScrollViewer x:Name="ScView" Grid.Row="2">
158
                        <telerik:RadListBox
159
                            x:Name="lstSymbolPrivate"
160
                            AllowDrop="False"
161
                            Background="#f5f5f5"
162
                            FontWeight="Normal"
163
                            ItemTemplate="{StaticResource SymbolTemplate_Private}"
164
                            MouseDown="lstSymbolPrivate_MouseDown"
165
                            MouseLeave="lstSymbolPrivate_MouseLeave"
166
                            PreviewMouseUp="lstSymbolPrivate_PreviewMouseUp"
167
                            PreviewMouseWheel="lstSymbolPrivate_PreviewMouseWheel">
168 1edefbdf taeseongkim
                            <!--<telerik:RadListBox.DragDropBehavior>
169 f65e6c02 taeseongkim
                                <telerik:ListBoxDragDropBehavior AllowReorder="True" />
170 1edefbdf taeseongkim
                            </telerik:RadListBox.DragDropBehavior>-->
171 c7fde400 taeseongkim
                            <telerik:RadListBox.DragVisualProvider>
172 f65e6c02 taeseongkim
                                <Behaviors:RadListBoxDragVisualProvider DragVisualStyle="{StaticResource CustomDragVisualStyle}">
173
                                    <Behaviors:RadListBoxDragVisualProvider.DraggedItemTemplate>
174
                                        <DataTemplate>
175
                                            <Grid Width="80">
176
                                                <Image
177 f1f822e9 taeseongkim
                                                    HorizontalAlignment="Left"
178
                                                    Source="{Binding ImageUri, Converter={StaticResource SvgImageConverter}}"
179
                                                    Stretch="UniformToFill" />
180 f65e6c02 taeseongkim
                                            </Grid>
181
                                        </DataTemplate>
182
                                    </Behaviors:RadListBoxDragVisualProvider.DraggedItemTemplate>
183
                                </Behaviors:RadListBoxDragVisualProvider>
184 c7fde400 taeseongkim
                            </telerik:RadListBox.DragVisualProvider>
185
                        </telerik:RadListBox>
186 5ce56a3a KangIngu
                    </ScrollViewer>
187
                </Grid>
188
            </telerik:RadTabItem>
189 ffcc8124 ljiyeon
190 f1f822e9 taeseongkim
            <telerik:RadTabItem
191
                FontSize="10"
192
                FontWeight="Bold"
193
                Header="Public"
194
                HeaderForeground="{DynamicResource KCOMColor_MarkerBrush}">
195 5ce56a3a KangIngu
                <Grid>
196
                    <Grid.RowDefinitions>
197 f1f822e9 taeseongkim
                        <RowDefinition Height="Auto" />
198
                        <RowDefinition Height="*" />
199 5ce56a3a KangIngu
                    </Grid.RowDefinitions>
200
201
                    <StackPanel Grid.Row="0" Orientation="Vertical">
202
                        <Grid Margin="0,10">
203
                            <Grid.ColumnDefinitions>
204 f1f822e9 taeseongkim
                                <ColumnDefinition Width="1*" />
205
                                <ColumnDefinition Width="3*" />
206 5ce56a3a KangIngu
                            </Grid.ColumnDefinitions>
207 53880c83 ljiyeon
208 f1f822e9 taeseongkim
                            <TextBlock VerticalAlignment="Center" FontWeight="Normal">Department</TextBlock>
209
                            <telerik:RadComboBox
210
                                x:Name="deptlist"
211
                                Grid.Column="1"
212
                                Margin="5"
213
                                HorizontalAlignment="Stretch"
214
                                Background="White"
215
                                BorderBrush="#d6d6d6"
216
                                ClearSelectionButtonContent="Show All"
217
                                ClearSelectionButtonVisibility="Visible"
218
                                DropDownWidth="*"
219
                                EmptyText="ALL"
220
                                FontWeight="Normal"
221
                                SelectionChanged="deptlist_SelectionChanged" />
222 5ce56a3a KangIngu
223
                        </Grid>
224 ffcc8124 ljiyeon
225
                        <Grid Margin="0,0">
226 702abd98 humkyung
                            <Grid.ColumnDefinitions>
227 f1f822e9 taeseongkim
                                <ColumnDefinition Width="3*" />
228
                                <ColumnDefinition Width="3*" />
229
                                <ColumnDefinition Width="3*" />
230
                                <ColumnDefinition Width="3*" />
231 ffcc8124 ljiyeon
                            </Grid.ColumnDefinitions>
232 f1f822e9 taeseongkim
                            <Button
233
                                Grid.Column="0"
234
                                Margin="5,0,0,0"
235
                                Padding="5"
236
                                Background="#3d3d3d"
237
                                Click="Place_Symbol_Public"
238
                                Content="Place"
239
                                FontWeight="Normal"
240
                                Foreground="White" />
241
                            <Button
242
                                Grid.Column="1"
243
                                Margin="5,0,0,0"
244
                                Padding="5"
245
                                Background="#3d3d3d"
246
                                Click="Image_Place_Register"
247
                                Content="Capture"
248
                                FontWeight="Normal"
249
                                Foreground="White" />
250
                            <Button
251
                                Grid.Column="2"
252
                                Margin="5,0,0,0"
253
                                Padding="5"
254
                                Background="#3d3d3d"
255
                                Click="Create_Symbol"
256
                                Content="Register"
257
                                FontWeight="Normal"
258
                                Foreground="White" />
259 53880c83 ljiyeon
                            <!--<Button Content="Rename" Grid.Column="2" Click="Rename_Symbol_Public" Margin="5,0,0,0" FontWeight="Normal" Padding="5" Background="#3d3d3d" Foreground="White"/>-->
260 f1f822e9 taeseongkim
                            <Button
261
                                Grid.Column="3"
262
                                Margin="5,0,0,0"
263
                                Padding="5"
264
                                Background="#3d3d3d"
265
                                Click="Remove_Symbol_Public"
266
                                Content="Remove"
267
                                FontWeight="Normal"
268
                                Foreground="White" />
269 29010418 ljiyeon
                        </Grid>
270 ffcc8124 ljiyeon
                        <Grid Margin="0,10">
271
                            <Grid.ColumnDefinitions>
272 f1f822e9 taeseongkim
                                <ColumnDefinition Width="*" />
273 702abd98 humkyung
                            </Grid.ColumnDefinitions>
274 f1f822e9 taeseongkim
                            <TextBlock
275
                                Grid.Column="0"
276
                                HorizontalAlignment="Right"
277
                                VerticalAlignment="Center"
278
                                FontSize="10"
279
                                Text="[Tip : Double Click]" />
280 702abd98 humkyung
                        </Grid>
281 5ce56a3a KangIngu
                    </StackPanel>
282 f1f822e9 taeseongkim
                    <ScrollViewer x:Name="ScView_Public" Grid.Row="2">
283
                        <telerik:RadListBox
284
                            x:Name="lstSymbolPublic"
285
                            AllowDrop="False"
286
                            Background="#f5f5f5"
287
                            FontWeight="Normal"
288
                            ItemTemplate="{StaticResource SymbolTemplate_Private}"
289
                            MouseDown="lstSymbolPrivate_MouseDown"
290
                            MouseLeave="lstSymbolPrivate_MouseLeave"
291
                            PreviewMouseUp="lstSymbolPrivate_PreviewMouseUp"
292
                            PreviewMouseWheel="lstSymbolPublic_PreviewMouseWheel">
293 f65e6c02 taeseongkim
                            <telerik:RadListBox.DragDropBehavior>
294 5ce56a3a KangIngu
                                <telerik:ListBoxDragDropBehavior AllowReorder="True" />
295 f65e6c02 taeseongkim
                            </telerik:RadListBox.DragDropBehavior>
296
                            <telerik:RadListBox.DragVisualProvider>
297
                                <Behaviors:RadListBoxDragVisualProvider>
298
                                    <Behaviors:RadListBoxDragVisualProvider.DraggedItemTemplate>
299
                                        <DataTemplate>
300
                                            <Grid>
301 f1f822e9 taeseongkim
                                                <Image
302
                                                    x:Name="SymbolImage"
303
                                                    Width="80"
304
                                                    Source="{Binding ImageUri, Converter={StaticResource SvgImageConverter}}"
305
                                                    Stretch="Fill" />
306 f65e6c02 taeseongkim
                                            </Grid>
307
                                        </DataTemplate>
308
                                    </Behaviors:RadListBoxDragVisualProvider.DraggedItemTemplate>
309
                                </Behaviors:RadListBoxDragVisualProvider>
310
                            </telerik:RadListBox.DragVisualProvider>
311
                        </telerik:RadListBox>
312 53880c83 ljiyeon
                    </ScrollViewer>
313 5ce56a3a KangIngu
                </Grid>
314
            </telerik:RadTabItem>
315
        </telerik:RadTabControl>
316 787a4489 KangIngu
    </Grid>
317
</UserControl>
클립보드 이미지 추가 (최대 크기: 500 MB)