프로젝트

일반

사용자정보

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

markus / KCOM / Views / RequirementView.xaml @ fe5ec96f

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

1
<UserControl x:Class="KCOM.Views.RequirementView"
2
          xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
3
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
4
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
5
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
6
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
7
        xmlns:local="clr-namespace:KCOM.Controls" FontSize="12"
8
        xmlns:behavior="clr-namespace:KCOM.Behaviors"
9
        xmlns:viewmodel="clr-namespace:KCOM.ViewModel"
10
        xmlns:convert="clr-namespace:KCOM.Converters"
11
        xmlns:Behaviors="clr-namespace:KCOM.Behaviors"
12
        xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
13
        mc:Ignorable="d" d:DesignHeight="768" d:DesignWidth="350" DataContext="{DynamicResource ViewModel}">
14
    <UserControl.Resources>
15
        <viewmodel:RequirementViewModel x:Key="ViewModel"/>
16
        <convert:StringMultiLineConvert x:Key="StringMultiLineConvert"/>
17
    </UserControl.Resources>
18
    <i:Interaction.Triggers>
19
        <i:EventTrigger  EventName="Loaded">
20
            <i:InvokeCommandAction Command="{Binding LoadedCommand}"/>
21
        </i:EventTrigger>
22
        <i:EventTrigger  EventName="Unloaded">
23
            <i:InvokeCommandAction Command="{Binding ClosingCommand}"/>
24
        </i:EventTrigger>
25
    </i:Interaction.Triggers>
26
    <Grid x:Name="grid" Margin="2">
27
        <Grid.ColumnDefinitions>
28
            <ColumnDefinition Width="*"/>
29
        </Grid.ColumnDefinitions>
30
        <Grid.RowDefinitions>
31
            <RowDefinition Height="Auto"/>
32
            <RowDefinition Height="Auto"/>
33
            <RowDefinition/>
34
        </Grid.RowDefinitions>
35
        <Grid HorizontalAlignment="Right">
36
            <Grid.ColumnDefinitions>
37
                <ColumnDefinition/>
38
                <ColumnDefinition Width="4"/>
39
                <ColumnDefinition/>
40
                <ColumnDefinition Width="4"/>
41
                <ColumnDefinition/>
42
            </Grid.ColumnDefinitions>
43
            <WrapPanel Grid.Row="1" HorizontalAlignment="Left" Orientation="Horizontal" Visibility="Collapsed">
44
                <telerik:RadButton Content="추가" Background="#3d3d3d" Foreground="White" Margin="5,0" MinWidth="60" Command="{Binding AddVPCommentCommand}"/>
45
                <telerik:RadToggleButton Width="20" Height="20" Command="{Binding RefreshCommand}" Margin="3">
46
                    <Image Stretch="Fill" Source="/KCOM;component/Resources/Images/MenuImage/Refresh.png"/>
47
                </telerik:RadToggleButton>
48
                <!--<telerik:RadToggleButton Width="15" Height="15"  Command="{Binding RefreshCommand}">
49
                <Image Stretch="Fill" Source="/KCOM;component/Resources/Images/MenuImage/Refresh.png"/>
50
            </telerik:RadToggleButton>-->
51
            </WrapPanel>
52
        </Grid>
53
        
54
        <telerik:RadGridView Grid.Row="2" AutoGenerateColumns="False" ItemsSource="{Binding RequirementList}" ShowGroupPanel="False"
55
                              CanUserFreezeColumns="False" x:Name="Gridview" SelectedItem="{Binding SelectRequirement}"
56
                              RowIndicatorVisibility="Collapsed" ScrollViewer.HorizontalScrollBarVisibility="Disabled" ColumnWidth="*"
57
                              IsExpandedBinding="{Binding IsExpanded,Mode=TwoWay}" IsExpandableBinding="{Binding IsExpandable, Mode=TwoWay}"
58
                             GridLinesVisibility="Horizontal" HorizontalGridLinesBrush="Orange">
59
            <telerik:RadGridView.ChildTableDefinitions>
60
                <telerik:GridViewTableDefinition/>
61
            </telerik:RadGridView.ChildTableDefinitions>
62
            <telerik:RadGridView.Columns>
63
                <telerik:GridViewDataColumn Header="Commant" IsReadOnly="True" IsFilterable="True"
64
                                            TextAlignment="Left" TextWrapping="WrapWithOverflow"
65
                                            DataMemberBinding="{Binding mdText,Converter={StaticResource StringMultiLineConvert}}"/>
66
            </telerik:RadGridView.Columns>
67
            <telerik:RadGridView.HierarchyChildTemplate>
68
                <DataTemplate>
69
                    <Grid Background="#FF999999">
70
                        <Grid.RowDefinitions>
71
                            <RowDefinition Height="Auto"/>
72
                            <RowDefinition Height="*"/>
73
                        </Grid.RowDefinitions>
74
                        <Grid.ColumnDefinitions>
75
                            <ColumnDefinition Width="10"/>
76
                            <ColumnDefinition Width="*"/>
77
                        </Grid.ColumnDefinitions>
78
                        <telerik:RadPathButton Width="100" Height="24" HorizontalAlignment="Left" Content="연결 추가" FontSize="12" Grid.ColumnSpan="2" Margin="15,2,2,2"
79
                                                    Command="{Binding AddVPCommentCommand, Source={StaticResource ViewModel}}"
80
                                                    ContentPlacement="Left"
81
                                                    CommandParameter="{Binding RelativeSource={RelativeSource AncestorType=telerik:GridViewRow}}"
82
                                                   PathGeometry="m4,7l0,2l3,0l0,3l2,0l0,-3l3,0l0,-2l-3,0l0,-3l-2,0l0,3l-3,0zm4,9c-4.41828,0 -8,-3.58172 -8,-8c0,-4.41828 3.58172,-8 8,-8c4.41828,0 8,3.58172 8,8c0,4.41828 -3.58172,8 -8,8zm0,0" >
83
                            <telerik:RadPathButton.PathStyle>
84
                                <Style TargetType="Path">
85
                                    <Setter Property="Width" Value="18"/>
86
                                    <Setter Property="Height" Value="18"/>
87
                                    <Setter Property="Fill" Value="#FF0A93E2" />
88
                                    <Setter Property="Stretch" Value="Fill" />
89
                                    <Setter Property="HorizontalAlignment" Value="Right" />
90
                                    <Setter Property="VerticalAlignment" Value="Center" />
91
                                </Style>
92
                            </telerik:RadPathButton.PathStyle>
93
                        </telerik:RadPathButton>
94
                        <telerik:RadGridView x:Name="DetailGridView" GroupRenderMode="Flat" Grid.Row="1"
95
                                                                                 BorderThickness="0,1,0,1" Grid.Column="1"
96
                                                                                 GridLinesVisibility="Both"
97
                                             ScrollViewer.HorizontalScrollBarVisibility="Disabled"  ColumnWidth="*"
98
                                                                                 CanUserFreezeColumns="False" HorizontalGridLinesBrush="#FFB0AFAF"
99
                                                                                 AutoGenerateColumns="False" behavior:GridViewAutoWidthBehavior.IsEnabled="True"
100
                                                                                 ItemsSource="{Binding VpComments}"
101
                                                                                 ShowGroupPanel="False" SelectedItem="{Binding SelectVPComment, Source={StaticResource ViewModel}}"
102
                                                                                 IsReadOnly="True">
103
                            <i:Interaction.Triggers>
104
                                <i:EventTrigger  EventName="SelectionChanged">
105
                                    <i:InvokeCommandAction Command="{Binding SelectedVPCommentCommand, Source={StaticResource ViewModel}}"/>
106
                                </i:EventTrigger>
107
                            </i:Interaction.Triggers>
108
                            <telerik:RadGridView.Columns>
109
                                <telerik:GridViewDataColumn DataMemberBinding="{Binding createdByName}" Width="80" IsFilterable="False" IsReadOnly="True"
110
                                                                                                                Header="Create User" />
111
                                <telerik:GridViewDataColumn DataMemberBinding="{Binding comment}" TextAlignment="Left" IsReadOnly="True" TextTrimming="CharacterEllipsis" IsFilterable="False" 
112
                                                                                                                Header="Comment" />
113
                                <telerik:GridViewDataColumn DataMemberBinding="{Binding condition}" Header="Condition" Width="64"  IsReadOnly="True">
114
                                    <telerik:GridViewDataColumn.CellTemplate>
115
                                        <DataTemplate>
116
                                            <CheckBox IsChecked="{Binding condition, Mode=TwoWay}"/>
117
                                        </DataTemplate>
118
                                    </telerik:GridViewDataColumn.CellTemplate>
119
                                </telerik:GridViewDataColumn>
120
                                <telerik:GridViewDataColumn Width="24" IsFilterable="False" IsReadOnly="True">
121
                                    <telerik:GridViewDataColumn.CellTemplate>
122
                                        <DataTemplate>
123
                                            <telerik:RadPathButton ToolTip="Delete Comment" Height="22" Width="22"
124
                                                    Command="{Binding DelVPCommentCommand, Source={StaticResource ViewModel}}"
125
                                                    CommandParameter="{Binding RelativeSource={RelativeSource AncestorType=telerik:GridViewRow}}" Background="{x:Null}" BorderBrush="{x:Null}"
126
                                                    PathGeometry="M108.319,108.319c-2.106,2.107-5.523,2.106-7.632-0.001l-0.003-0.003L70.159,77.79L39.63,108.318   c-2.106,2.108-5.523,2.107-7.634,0c-2.104-2.106-2.105-5.523,0-7.633l30.528-30.528l-30.54-30.541   c-2.106-2.104-2.106-5.521,0-7.631c2.105-2.107,5.522-2.107,7.633-0.001l30.541,30.541l30.528-30.527   c2.105-2.105,5.523-2.105,7.633,0c2.109,2.106,2.107,5.524,0,7.633L77.791,70.157l30.527,30.528   C110.427,102.794,110.427,106.212,108.319,108.319 M119.767,119.767c27.396-27.397,27.396-71.818,0-99.217   C92.37-6.849,47.947-6.85,20.547,20.548c-27.397,27.398-27.396,71.819,0.001,99.22C47.947,147.166,92.368,147.165,119.767,119.767">
127
                                            </telerik:RadPathButton>
128
                                        </DataTemplate>
129
                                    </telerik:GridViewDataColumn.CellTemplate>
130
                                </telerik:GridViewDataColumn>
131
                            </telerik:RadGridView.Columns>
132
                        </telerik:RadGridView>
133
                    </Grid>
134
                </DataTemplate>
135
            </telerik:RadGridView.HierarchyChildTemplate>
136
        </telerik:RadGridView>
137
    </Grid>
138
</UserControl>
클립보드 이미지 추가 (최대 크기: 500 MB)