프로젝트

일반

사용자정보

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

markus / KCOM / Controls / Symbol.xaml @ 122914ba

이력 | 보기 | 이력해설 | 다운로드 (10.4 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:d="http://schemas.microsoft.com/expression/blend/2008" 
6
             xmlns:WrapPanel ="clr-namespace:KCOM.WrapPanel"
7
             xmlns:local="clr-namespace:KCOM.Controls"
8
             xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
9
             xmlns:converter="clr-namespace:KCOM.Common.Converter"
10
             mc:Ignorable="d" Background="#f5f5f5"
11
             d:DesignHeight="900" d:DesignWidth="300">
12

    
13
    <UserControl.Resources>
14
        <converter:SvgImageConverter x:Key="SvgImageConverter"/>
15
            <DataTemplate x:Key="SymbolTemplate_Private">
16
             
17
            <StackPanel MouseLeftButtonDown="Move_Symbol" MouseLeave="StackPanel_MouseLeave" MouseUp="StackPanel_MouseUp" ToolTipService.ToolTip="{Binding Name}">
18
                <Grid>
19
                    <StackPanel>
20
                        <!--<Border Background="#FF1FA3EB">-->
21
                        <Border Background="#FF2A579A">
22
                            <TextBox MaxWidth="200"
23
                                       Background="#FF2A579A"
24
                                       HorizontalAlignment="Center"
25
                                       VerticalAlignment="Center"
26
                                       Foreground="White"
27
                                       Text="{Binding Name}" 
28
                                       x:Name="symbolName"          
29
                                       BorderBrush="#FF2A579A"
30
                                       KeyDown="OnKeyDownHandler"/>
31
                        </Border>
32
                        <Image Width="200"
33
                               Height="64"
34
                               Margin="3"
35
                               HorizontalAlignment="Center"
36
                               x:Name="symbolImage">
37
                            <!-- Source="{Binding ImageUri}" -->
38
                            <Image.Source>
39
                                <MultiBinding Converter="{StaticResource SvgImageConverter}" UpdateSourceTrigger="PropertyChanged">
40
                                    <Binding Path="ImageUri"/>
41
                                </MultiBinding>
42
                            </Image.Source>
43

    
44
                        </Image>
45
                    </StackPanel>
46
                    <Rectangle Opacity="0.7"
47
                               Stroke="#ff6c6d6d"
48
                               StrokeThickness="1" />
49
                </Grid>
50
            </StackPanel>
51
        </DataTemplate>
52
            <Style x:Key="DraggableListBox" TargetType="ListBox">
53
            <Setter Property="telerik:DragDropManager.AllowCapturedDrag" Value="True" />
54
        </Style>
55
    </UserControl.Resources>
56
    <Grid  Margin="10">
57
        <telerik:RadTabControl BorderThickness="0" x:Name="RadTab" telerik:StyleManager.Theme="Office2016"  HeaderBackground="#f5f5f5" FontSize="10" HorizontalAlignment="Stretch" HorizontalContentAlignment="Stretch"
58
                               ScrollViewer.HorizontalScrollBarVisibility ="Disabled" SelectedIndex="0" PreviewSelectionChanged="RadTabControl_PreviewSelectionChanged">
59

    
60
            <telerik:RadTabItem Header="Private" FontSize="10" FontWeight="Bold" HeaderForeground="{DynamicResource KCOMColor_MarkerBrush}">
61
                <Grid>
62
                    <Grid.RowDefinitions>
63
                        <RowDefinition Height="Auto"/>
64
                        <RowDefinition Height="Auto"/>
65
                        <RowDefinition Height="*"/>
66
                    </Grid.RowDefinitions>
67

    
68
                    <StackPanel Grid.Row="0" Orientation="Vertical">
69
                        <Grid Margin="0,10">
70
                            <Grid.ColumnDefinitions>
71
                                <ColumnDefinition Width="3*"/>
72
                                <ColumnDefinition Width="3*"/>
73
                                <ColumnDefinition Width="3*"/>
74
                                <ColumnDefinition Width="3*"/>
75
                            </Grid.ColumnDefinitions>
76
                            <Button Content="Place"     Grid.Column="0" Click="Place_Symbol"  Margin="5,0,0,0" FontWeight="Normal" Padding="5" Background="#3d3d3d" Foreground="White"/>
77
                            <Button Content="Capture"  Grid.Column="1" Click="Image_Place_Register"  Margin="5,0,0,0" FontWeight="Normal" Padding="5" Background="#3d3d3d" Foreground="White"/>
78
                            <Button Content="Register"  Grid.Column="2" Click="Create_Symbol" Margin="5,0,0,0" FontWeight="Normal" Padding="5" Background="#3d3d3d" Foreground="White"/>
79
                            <!-- <Button Content="Rename"    Grid.Column="2" Click="Rename_Symbol" Margin="5,0,0,0" FontWeight="Normal" Padding="5" Background="#3d3d3d" Foreground="White"/> -->
80
                            
81
                            <Button Content="Remove"    Grid.Column="3" Click="Remove_Symbol" Margin="5,0,0,0" FontWeight="Normal" Padding="5" Background="#3d3d3d" Foreground="White"/>
82
                        </Grid>
83
                        <Grid Margin="0,0,0,10">
84
                            <Grid.ColumnDefinitions>
85
                                <ColumnDefinition Width="*"/>
86
                            </Grid.ColumnDefinitions>
87
                            <TextBlock Text="[Tip : Double Click]" Grid.Column="0" FontSize="10" VerticalAlignment="Center" HorizontalAlignment="Right"/>
88
                        </Grid>
89
                    </StackPanel>
90
                    <ScrollViewer x:Name="ScView" Grid.Row="2" >
91
                        <ListBox x:Name="lstSymbolPrivate" Background="#f5f5f5" FontWeight="Normal" ItemTemplate="{StaticResource SymbolTemplate_Private}" 
92
                                 MouseDown="lstSymbolPrivate_MouseDown"
93
                                 PreviewMouseUp="lstSymbolPrivate_PreviewMouseUp"
94
                                 MouseLeave="lstSymbolPrivate_MouseLeave"
95
                                 PreviewMouseWheel ="lstSymbolPrivate_PreviewMouseWheel">
96
                            <telerik:ListBoxDragDrop.Behavior>
97
                                <telerik:ListBoxDragDropBehavior AllowReorder="True" />
98
                            </telerik:ListBoxDragDrop.Behavior>
99
                        </ListBox>
100
                    </ScrollViewer>
101
                </Grid>
102
            </telerik:RadTabItem>
103

    
104
            <telerik:RadTabItem Header="Public" FontWeight="Bold" FontSize="10" HeaderForeground="{DynamicResource KCOMColor_MarkerBrush}" >
105
                <Grid>
106
                    <Grid.RowDefinitions>
107
                        <RowDefinition Height="Auto"/>
108
                        <RowDefinition Height="*"/>
109
                    </Grid.RowDefinitions>
110

    
111
                    <StackPanel Grid.Row="0" Orientation="Vertical">
112
                        <Grid Margin="0,10">
113
                            <Grid.ColumnDefinitions>
114
                                <ColumnDefinition Width="1*"/>
115
                                <ColumnDefinition Width="3*"/>
116
                            </Grid.ColumnDefinitions>
117

    
118
                            <TextBlock FontWeight="Normal" VerticalAlignment="Center">Department</TextBlock>
119
                            <telerik:RadComboBox FontWeight="Normal" EmptyText="ALL" Grid.Column="1"  HorizontalAlignment="Stretch" Margin="5" DropDownWidth="*" Background="White" BorderBrush="#d6d6d6" x:Name="deptlist"
120
                                                  ClearSelectionButtonVisibility="Visible" ClearSelectionButtonContent="Show All" SelectionChanged="deptlist_SelectionChanged"/>
121

    
122
                        </Grid>
123

    
124
                        <Grid Margin="0,0">
125
                            <Grid.ColumnDefinitions>
126
                                <ColumnDefinition Width="3*"/>
127
                                <ColumnDefinition Width="3*"/>
128
                                <ColumnDefinition Width="3*"/>
129
                                <ColumnDefinition Width="3*"/>
130
                            </Grid.ColumnDefinitions>
131
                            <Button Content="Place" Click="Place_Symbol_Public" Grid.Column="0"  Margin="5,0,0,0" FontWeight="Normal" Padding="5" Background="#3d3d3d" Foreground="White"/>
132
                            <Button Content="Capture"  Grid.Column="1" Click="Image_Place_Register"  Margin="5,0,0,0" FontWeight="Normal" Padding="5" Background="#3d3d3d" Foreground="White"/>
133
                            <Button Content="Register" Grid.Column="2" Click="Create_Symbol" Margin="5,0,0,0" FontWeight="Normal" Padding="5" Background="#3d3d3d" Foreground="White"/>                            
134
                            <!--<Button Content="Rename" Grid.Column="2" Click="Rename_Symbol_Public" Margin="5,0,0,0" FontWeight="Normal" Padding="5" Background="#3d3d3d" Foreground="White"/>-->
135
                            <Button Content="Remove" Grid.Column="3" Click="Remove_Symbol_Public" Margin="5,0,0,0" FontWeight="Normal" Padding="5"  Background="#3d3d3d" Foreground="White"/>
136
                        </Grid>                       
137
                        <Grid Margin="0,10">
138
                            <Grid.ColumnDefinitions>
139
                                <ColumnDefinition Width="*"/>
140
                            </Grid.ColumnDefinitions>
141
                            <TextBlock Text="[Tip : Double Click]" Grid.Column="0" FontSize="10" VerticalAlignment="Center" HorizontalAlignment="Right"/>
142
                        </Grid>
143
                    </StackPanel>
144

    
145
                    <ScrollViewer x:Name="ScView_Public" Grid.Row="2" >
146
                        <ListBox x:Name="lstSymbolPublic" Background="#f5f5f5" FontWeight="Normal" ItemTemplate="{StaticResource SymbolTemplate_Private}" 
147
                                 MouseDown="lstSymbolPrivate_MouseDown"
148
                                 PreviewMouseUp="lstSymbolPrivate_PreviewMouseUp"
149
                                 MouseLeave="lstSymbolPrivate_MouseLeave"
150
                                 PreviewMouseWheel ="lstSymbolPublic_PreviewMouseWheel">
151
                            <telerik:ListBoxDragDrop.Behavior>
152
                                <telerik:ListBoxDragDropBehavior AllowReorder="True" />
153
                            </telerik:ListBoxDragDrop.Behavior>
154
                        </ListBox>
155
                    </ScrollViewer>
156
                </Grid>
157
            </telerik:RadTabItem>
158
        </telerik:RadTabControl>
159
    </Grid>
160
</UserControl>
클립보드 이미지 추가 (최대 크기: 500 MB)