markus / KCOM / Controls / Symbol.xaml @ 3b938959
이력 | 보기 | 이력해설 | 다운로드 (16.2 KB)
1 |
<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 |
<UserControl.Resources>
|
21 |
<converter:SvgImageConverter x:Key="SvgImageConverter" /> |
22 |
<Style
|
23 |
x:Key="CustomDragVisualStyle2" |
24 |
BasedOn="{StaticResource DragVisualStyle}" |
25 |
TargetType="telerik:DragVisual"> |
26 |
<Setter Property="Background" Value="Transparent" /> |
27 |
<Setter Property="BorderThickness" Value="0" /> |
28 |
<Setter Property="Margin" Value="0" /> |
29 |
<Setter Property="Padding" Value="0" /> |
30 |
</Style>
|
31 |
<Style BasedOn="{StaticResource RadListBoxItemStyle}" TargetType="telerik:RadListBoxItem"> |
32 |
<Setter Property="telerik:DragDropManager.AllowCapturedDrag" Value="True" /> |
33 |
<!--<Setter Property="telerik:TouchManager.DragStartTrigger" Value="TapHoldAndMove"/>-->
|
34 |
</Style>
|
35 |
<DataTemplate x:Key="SymbolTemplate_Private"> |
36 |
<StackPanel
|
37 |
AllowDrop="False" |
38 |
MouseLeave="StackPanel_MouseLeave" |
39 |
MouseLeftButtonDown="Move_Symbol" |
40 |
MouseUp="StackPanel_MouseUp" |
41 |
ToolTipService.ToolTip="{Binding Name}"> |
42 |
<Grid>
|
43 |
<StackPanel>
|
44 |
<!--<Border Background="#FF1FA3EB">-->
|
45 |
<Border Background="#FF2A579A"> |
46 |
<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 |
</Border>
|
57 |
<Image
|
58 |
x:Name="symbolImage" |
59 |
Width="200" |
60 |
Height="64" |
61 |
Margin="3" |
62 |
HorizontalAlignment="Center" |
63 |
Source="{Binding ImageUri, Converter={StaticResource SvgImageConverter}, IsAsync=True}" /> |
64 |
</StackPanel>
|
65 |
<Rectangle
|
66 |
Opacity="0.7" |
67 |
Stroke="#ff6c6d6d" |
68 |
StrokeThickness="1" /> |
69 |
</Grid>
|
70 |
</StackPanel>
|
71 |
</DataTemplate>
|
72 |
</UserControl.Resources>
|
73 |
<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 |
|
86 |
<telerik:RadTabItem
|
87 |
FontSize="10" |
88 |
FontWeight="Bold" |
89 |
Header="Private" |
90 |
HeaderForeground="{DynamicResource KCOMColor_MarkerBrush}"> |
91 |
<Grid>
|
92 |
<Grid.RowDefinitions>
|
93 |
<RowDefinition Height="Auto" /> |
94 |
<RowDefinition Height="Auto" /> |
95 |
<RowDefinition Height="*" /> |
96 |
</Grid.RowDefinitions>
|
97 |
|
98 |
<StackPanel Grid.Row="0" Orientation="Vertical"> |
99 |
<Grid Margin="0,10"> |
100 |
<Grid.ColumnDefinitions>
|
101 |
<ColumnDefinition Width="3*" /> |
102 |
<ColumnDefinition Width="3*" /> |
103 |
<ColumnDefinition Width="3*" /> |
104 |
<ColumnDefinition Width="3*" /> |
105 |
</Grid.ColumnDefinitions>
|
106 |
<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 |
<!-- <Button Content="Rename" Grid.Column="2" Click="Rename_Symbol" Margin="5,0,0,0" FontWeight="Normal" Padding="5" Background="#3d3d3d" Foreground="White"/> -->
|
134 |
|
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 |
</Grid>
|
145 |
<Grid Margin="0,0,0,10"> |
146 |
<Grid.ColumnDefinitions>
|
147 |
<ColumnDefinition Width="*" /> |
148 |
</Grid.ColumnDefinitions>
|
149 |
<TextBlock
|
150 |
Grid.Column="0" |
151 |
HorizontalAlignment="Right" |
152 |
VerticalAlignment="Center" |
153 |
FontSize="10" |
154 |
Text="[Tip : Double Click]" /> |
155 |
</Grid>
|
156 |
</StackPanel>
|
157 |
<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 |
<!--<telerik:RadListBox.DragDropBehavior>
|
169 |
<telerik:ListBoxDragDropBehavior AllowReorder="True" />
|
170 |
</telerik:RadListBox.DragDropBehavior>-->
|
171 |
<telerik:RadListBox.DragVisualProvider>
|
172 |
<Behaviors:RadListBoxDragVisualProvider DragVisualStyle="{StaticResource CustomDragVisualStyle}"> |
173 |
<Behaviors:RadListBoxDragVisualProvider.DraggedItemTemplate>
|
174 |
<DataTemplate>
|
175 |
<Grid Width="80"> |
176 |
<Image
|
177 |
HorizontalAlignment="Left" |
178 |
Source="{Binding ImageUri, Converter={StaticResource SvgImageConverter}}" |
179 |
Stretch="UniformToFill" /> |
180 |
</Grid>
|
181 |
</DataTemplate>
|
182 |
</Behaviors:RadListBoxDragVisualProvider.DraggedItemTemplate>
|
183 |
</Behaviors:RadListBoxDragVisualProvider>
|
184 |
</telerik:RadListBox.DragVisualProvider>
|
185 |
</telerik:RadListBox>
|
186 |
</ScrollViewer>
|
187 |
</Grid>
|
188 |
</telerik:RadTabItem>
|
189 |
|
190 |
<telerik:RadTabItem
|
191 |
FontSize="10" |
192 |
FontWeight="Bold" |
193 |
Header="Public" |
194 |
HeaderForeground="{DynamicResource KCOMColor_MarkerBrush}"> |
195 |
<Grid>
|
196 |
<Grid.RowDefinitions>
|
197 |
<RowDefinition Height="Auto" /> |
198 |
<RowDefinition Height="*" /> |
199 |
</Grid.RowDefinitions>
|
200 |
|
201 |
<StackPanel Grid.Row="0" Orientation="Vertical"> |
202 |
<Grid Margin="0,10"> |
203 |
<Grid.ColumnDefinitions>
|
204 |
<ColumnDefinition Width="1*" /> |
205 |
<ColumnDefinition Width="3*" /> |
206 |
</Grid.ColumnDefinitions>
|
207 |
|
208 |
<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 |
|
223 |
</Grid>
|
224 |
|
225 |
<Grid Margin="0,0"> |
226 |
<Grid.ColumnDefinitions>
|
227 |
<ColumnDefinition Width="3*" /> |
228 |
<ColumnDefinition Width="3*" /> |
229 |
<ColumnDefinition Width="3*" /> |
230 |
<ColumnDefinition Width="3*" /> |
231 |
</Grid.ColumnDefinitions>
|
232 |
<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 |
<!--<Button Content="Rename" Grid.Column="2" Click="Rename_Symbol_Public" Margin="5,0,0,0" FontWeight="Normal" Padding="5" Background="#3d3d3d" Foreground="White"/>-->
|
260 |
<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 |
</Grid>
|
270 |
<Grid Margin="0,10"> |
271 |
<Grid.ColumnDefinitions>
|
272 |
<ColumnDefinition Width="*" /> |
273 |
</Grid.ColumnDefinitions>
|
274 |
<TextBlock
|
275 |
Grid.Column="0" |
276 |
HorizontalAlignment="Right" |
277 |
VerticalAlignment="Center" |
278 |
FontSize="10" |
279 |
Text="[Tip : Double Click]" /> |
280 |
</Grid>
|
281 |
</StackPanel>
|
282 |
<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 |
<telerik:RadListBox.DragDropBehavior>
|
294 |
<telerik:ListBoxDragDropBehavior AllowReorder="True" /> |
295 |
</telerik:RadListBox.DragDropBehavior>
|
296 |
<telerik:RadListBox.DragVisualProvider>
|
297 |
<Behaviors:RadListBoxDragVisualProvider>
|
298 |
<Behaviors:RadListBoxDragVisualProvider.DraggedItemTemplate>
|
299 |
<DataTemplate>
|
300 |
<Grid>
|
301 |
<Image
|
302 |
x:Name="SymbolImage" |
303 |
Width="80" |
304 |
Source="{Binding ImageUri, Converter={StaticResource SvgImageConverter}}" |
305 |
Stretch="Fill" /> |
306 |
</Grid>
|
307 |
</DataTemplate>
|
308 |
</Behaviors:RadListBoxDragVisualProvider.DraggedItemTemplate>
|
309 |
</Behaviors:RadListBoxDragVisualProvider>
|
310 |
</telerik:RadListBox.DragVisualProvider>
|
311 |
</telerik:RadListBox>
|
312 |
</ScrollViewer>
|
313 |
</Grid>
|
314 |
</telerik:RadTabItem>
|
315 |
</telerik:RadTabControl>
|
316 |
</Grid>
|
317 |
</UserControl>
|