markus / KCOM / Controls / Symbol.xaml @ f65e6c02
이력 | 보기 | 이력해설 | 다운로드 (12.9 KB)
1 |
<UserControl x:Class="KCOM.Controls.Symbol" |
---|---|
2 |
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
3 |
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
4 |
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" |
5 |
xmlns:common="clr-namespace:KCOM.Common" |
6 |
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" |
7 |
xmlns:WrapPanel ="clr-namespace:KCOM.WrapPanel" |
8 |
xmlns:local="clr-namespace:KCOM.Controls" |
9 |
xmlns:ZoomAndPan="clr-namespace:ZoomAndPan;assembly=ZoomAndPan" |
10 |
xmlns:telerikDragDrop="clr-namespace:Telerik.Windows.DragDrop;assembly=Telerik.Windows.Controls" |
11 |
xmlns:dragDrop="clr-namespace:Telerik.Windows.Controls.DragDrop;assembly=Telerik.Windows.Controls" |
12 |
xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" |
13 |
xmlns:converter="clr-namespace:KCOM.Common.Converter" |
14 |
xmlns:Behaviors="clr-namespace:KCOM.Behaviors" |
15 |
mc:Ignorable="d" Background="#f5f5f5" |
16 |
d:DesignHeight="900" d:DesignWidth="300"> |
17 |
<UserControl.Resources>
|
18 |
<converter:SvgImageConverter x:Key="SvgImageConverter"/> |
19 |
<Style x:Key="CustomDragVisualStyle2" TargetType="telerik:DragVisual" BasedOn="{StaticResource DragVisualStyle}"> |
20 |
<Setter Property="Background" Value="Transparent" /> |
21 |
<Setter Property="BorderThickness" Value="0" /> |
22 |
<Setter Property="Margin" Value="0" /> |
23 |
<Setter Property="Padding" Value="0" /> |
24 |
</Style>
|
25 |
<Style TargetType="telerik:RadListBoxItem" BasedOn="{StaticResource RadListBoxItemStyle}"> |
26 |
<Setter Property="telerik:DragDropManager.AllowCapturedDrag" Value="True"/> |
27 |
<!--<Setter Property="telerik:TouchManager.DragStartTrigger" Value="TapHoldAndMove"/>-->
|
28 |
</Style>
|
29 |
<DataTemplate x:Key="SymbolTemplate_Private"> |
30 |
<StackPanel MouseLeftButtonDown="Move_Symbol" AllowDrop="False" MouseLeave="StackPanel_MouseLeave" MouseUp="StackPanel_MouseUp" ToolTipService.ToolTip="{Binding Name}"> |
31 |
<Grid>
|
32 |
<StackPanel>
|
33 |
<!--<Border Background="#FF1FA3EB">-->
|
34 |
<Border Background="#FF2A579A"> |
35 |
<TextBox MaxWidth="200" |
36 |
Background="#FF2A579A" |
37 |
HorizontalAlignment="Center" |
38 |
VerticalAlignment="Center" |
39 |
Foreground="White" |
40 |
Text="{Binding Name}" |
41 |
x:Name="symbolName" |
42 |
BorderBrush="#FF2A579A" |
43 |
KeyDown="OnKeyDownHandler"/> |
44 |
</Border>
|
45 |
<Image Width="200" |
46 |
Height="64" |
47 |
Margin="3" |
48 |
HorizontalAlignment="Center" |
49 |
Source="{Binding ImageUri,Converter={StaticResource SvgImageConverter},UpdateSourceTrigger=PropertyChanged}" |
50 |
x:Name="symbolImage"/> |
51 |
</StackPanel>
|
52 |
<Rectangle Opacity="0.7" |
53 |
Stroke="#ff6c6d6d" |
54 |
StrokeThickness="1" /> |
55 |
</Grid>
|
56 |
</StackPanel>
|
57 |
</DataTemplate>
|
58 |
</UserControl.Resources>
|
59 |
<Grid Margin="10"> |
60 |
<telerik:RadTabControl BorderThickness="0" x:Name="RadTab" telerik:StyleManager.Theme="Office2016" HeaderBackground="#f5f5f5" FontSize="10" HorizontalAlignment="Stretch" HorizontalContentAlignment="Stretch" |
61 |
ScrollViewer.HorizontalScrollBarVisibility ="Disabled" SelectedIndex="0" PreviewSelectionChanged="RadTabControl_PreviewSelectionChanged"> |
62 |
|
63 |
<telerik:RadTabItem Header="Private" FontSize="10" FontWeight="Bold" HeaderForeground="{DynamicResource KCOMColor_MarkerBrush}"> |
64 |
<Grid>
|
65 |
<Grid.RowDefinitions>
|
66 |
<RowDefinition Height="Auto"/> |
67 |
<RowDefinition Height="Auto"/> |
68 |
<RowDefinition Height="*"/> |
69 |
</Grid.RowDefinitions>
|
70 |
|
71 |
<StackPanel Grid.Row="0" Orientation="Vertical"> |
72 |
<Grid Margin="0,10"> |
73 |
<Grid.ColumnDefinitions>
|
74 |
<ColumnDefinition Width="3*"/> |
75 |
<ColumnDefinition Width="3*"/> |
76 |
<ColumnDefinition Width="3*"/> |
77 |
<ColumnDefinition Width="3*"/> |
78 |
</Grid.ColumnDefinitions>
|
79 |
<Button Content="Place" Grid.Column="0" Click="Place_Symbol" Margin="5,0,0,0" FontWeight="Normal" Padding="5" Background="#3d3d3d" Foreground="White"/> |
80 |
<Button Content="Capture" Grid.Column="1" Click="Image_Place_Register" Margin="5,0,0,0" FontWeight="Normal" Padding="5" Background="#3d3d3d" Foreground="White"/> |
81 |
<Button Content="Register" Grid.Column="2" Click="Create_Symbol" Margin="5,0,0,0" FontWeight="Normal" Padding="5" Background="#3d3d3d" Foreground="White"/> |
82 |
<!-- <Button Content="Rename" Grid.Column="2" Click="Rename_Symbol" Margin="5,0,0,0" FontWeight="Normal" Padding="5" Background="#3d3d3d" Foreground="White"/> -->
|
83 |
|
84 |
<Button Content="Remove" Grid.Column="3" Click="Remove_Symbol" Margin="5,0,0,0" FontWeight="Normal" Padding="5" Background="#3d3d3d" Foreground="White"/> |
85 |
</Grid>
|
86 |
<Grid Margin="0,0,0,10"> |
87 |
<Grid.ColumnDefinitions>
|
88 |
<ColumnDefinition Width="*"/> |
89 |
</Grid.ColumnDefinitions>
|
90 |
<TextBlock Text="[Tip : Double Click]" Grid.Column="0" FontSize="10" VerticalAlignment="Center" HorizontalAlignment="Right"/> |
91 |
</Grid>
|
92 |
</StackPanel>
|
93 |
<ScrollViewer x:Name="ScView" Grid.Row="2" > |
94 |
<telerik:RadListBox x:Name="lstSymbolPrivate" Background="#f5f5f5" FontWeight="Normal" |
95 |
ItemTemplate="{StaticResource SymbolTemplate_Private}" |
96 |
MouseDown="lstSymbolPrivate_MouseDown" |
97 |
PreviewMouseUp="lstSymbolPrivate_PreviewMouseUp" |
98 |
MouseLeave="lstSymbolPrivate_MouseLeave" AllowDrop="False" |
99 |
PreviewMouseWheel ="lstSymbolPrivate_PreviewMouseWheel"> |
100 |
<telerik:RadListBox.DragDropBehavior>
|
101 |
<telerik:ListBoxDragDropBehavior AllowReorder="True" /> |
102 |
</telerik:RadListBox.DragDropBehavior>
|
103 |
<telerik:RadListBox.DragVisualProvider>
|
104 |
<Behaviors:RadListBoxDragVisualProvider DragVisualStyle="{StaticResource CustomDragVisualStyle}"> |
105 |
<Behaviors:RadListBoxDragVisualProvider.DraggedItemTemplate>
|
106 |
<DataTemplate>
|
107 |
<Grid Width="80"> |
108 |
<Image
|
109 |
Source="{Binding ImageUri,Converter={StaticResource SvgImageConverter}}" |
110 |
HorizontalAlignment="Left"/> |
111 |
</Grid>
|
112 |
</DataTemplate>
|
113 |
</Behaviors:RadListBoxDragVisualProvider.DraggedItemTemplate>
|
114 |
</Behaviors:RadListBoxDragVisualProvider>
|
115 |
</telerik:RadListBox.DragVisualProvider>
|
116 |
</telerik:RadListBox>
|
117 |
</ScrollViewer>
|
118 |
</Grid>
|
119 |
</telerik:RadTabItem>
|
120 |
|
121 |
<telerik:RadTabItem Header="Public" FontWeight="Bold" FontSize="10" HeaderForeground="{DynamicResource KCOMColor_MarkerBrush}" > |
122 |
<Grid>
|
123 |
<Grid.RowDefinitions>
|
124 |
<RowDefinition Height="Auto"/> |
125 |
<RowDefinition Height="*"/> |
126 |
</Grid.RowDefinitions>
|
127 |
|
128 |
<StackPanel Grid.Row="0" Orientation="Vertical"> |
129 |
<Grid Margin="0,10"> |
130 |
<Grid.ColumnDefinitions>
|
131 |
<ColumnDefinition Width="1*"/> |
132 |
<ColumnDefinition Width="3*"/> |
133 |
</Grid.ColumnDefinitions>
|
134 |
|
135 |
<TextBlock FontWeight="Normal" VerticalAlignment="Center">Department</TextBlock> |
136 |
<telerik:RadComboBox FontWeight="Normal" EmptyText="ALL" Grid.Column="1" HorizontalAlignment="Stretch" Margin="5" DropDownWidth="*" Background="White" BorderBrush="#d6d6d6" x:Name="deptlist" |
137 |
ClearSelectionButtonVisibility="Visible" ClearSelectionButtonContent="Show All" SelectionChanged="deptlist_SelectionChanged"/> |
138 |
|
139 |
</Grid>
|
140 |
|
141 |
<Grid Margin="0,0"> |
142 |
<Grid.ColumnDefinitions>
|
143 |
<ColumnDefinition Width="3*"/> |
144 |
<ColumnDefinition Width="3*"/> |
145 |
<ColumnDefinition Width="3*"/> |
146 |
<ColumnDefinition Width="3*"/> |
147 |
</Grid.ColumnDefinitions>
|
148 |
<Button Content="Place" Click="Place_Symbol_Public" Grid.Column="0" Margin="5,0,0,0" FontWeight="Normal" Padding="5" Background="#3d3d3d" Foreground="White"/> |
149 |
<Button Content="Capture" Grid.Column="1" Click="Image_Place_Register" Margin="5,0,0,0" FontWeight="Normal" Padding="5" Background="#3d3d3d" Foreground="White"/> |
150 |
<Button Content="Register" Grid.Column="2" Click="Create_Symbol" Margin="5,0,0,0" FontWeight="Normal" Padding="5" Background="#3d3d3d" Foreground="White"/> |
151 |
<!--<Button Content="Rename" Grid.Column="2" Click="Rename_Symbol_Public" Margin="5,0,0,0" FontWeight="Normal" Padding="5" Background="#3d3d3d" Foreground="White"/>-->
|
152 |
<Button Content="Remove" Grid.Column="3" Click="Remove_Symbol_Public" Margin="5,0,0,0" FontWeight="Normal" Padding="5" Background="#3d3d3d" Foreground="White"/> |
153 |
</Grid>
|
154 |
<Grid Margin="0,10"> |
155 |
<Grid.ColumnDefinitions>
|
156 |
<ColumnDefinition Width="*"/> |
157 |
</Grid.ColumnDefinitions>
|
158 |
<TextBlock Text="[Tip : Double Click]" Grid.Column="0" FontSize="10" VerticalAlignment="Center" HorizontalAlignment="Right"/> |
159 |
</Grid>
|
160 |
</StackPanel>
|
161 |
<ScrollViewer x:Name="ScView_Public" Grid.Row="2" > |
162 |
<telerik:RadListBox x:Name="lstSymbolPublic" Background="#f5f5f5" FontWeight="Normal" |
163 |
ItemTemplate="{StaticResource SymbolTemplate_Private}" AllowDrop="False" |
164 |
MouseDown="lstSymbolPrivate_MouseDown" |
165 |
PreviewMouseUp="lstSymbolPrivate_PreviewMouseUp" |
166 |
MouseLeave="lstSymbolPrivate_MouseLeave" |
167 |
PreviewMouseWheel ="lstSymbolPublic_PreviewMouseWheel"> |
168 |
<telerik:RadListBox.DragDropBehavior>
|
169 |
<telerik:ListBoxDragDropBehavior AllowReorder="True" /> |
170 |
</telerik:RadListBox.DragDropBehavior>
|
171 |
<telerik:RadListBox.DragVisualProvider>
|
172 |
<Behaviors:RadListBoxDragVisualProvider>
|
173 |
<Behaviors:RadListBoxDragVisualProvider.DraggedItemTemplate>
|
174 |
<DataTemplate>
|
175 |
<Grid>
|
176 |
<Image Width="80" x:Name="SymbolImage" Source="{Binding ImageUri,Converter={StaticResource SvgImageConverter}}"/> |
177 |
</Grid>
|
178 |
</DataTemplate>
|
179 |
</Behaviors:RadListBoxDragVisualProvider.DraggedItemTemplate>
|
180 |
</Behaviors:RadListBoxDragVisualProvider>
|
181 |
</telerik:RadListBox.DragVisualProvider>
|
182 |
</telerik:RadListBox>
|
183 |
</ScrollViewer>
|
184 |
</Grid>
|
185 |
</telerik:RadTabItem>
|
186 |
</telerik:RadTabControl>
|
187 |
</Grid>
|
188 |
</UserControl>
|