프로젝트

일반

사용자정보

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

markus / KCOM / Views / RequirementView.xaml @ df2e7646

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

1
<UserControl x:Name="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:controls ="clr-namespace:KCOM.Controls"
11
        xmlns:convert="clr-namespace:KCOM.Converters"
12
        xmlns:Behaviors="clr-namespace:KCOM.Behaviors"
13
        xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
14
        mc:Ignorable="d" d:DesignHeight="300" d:DesignWidth="1000" DataContext="{DynamicResource ViewModel}">
15
    <UserControl.Resources>
16
        <convert:IListToIListCountConverter x:Key="IListToIListCountConverter"/>
17
        <viewmodel:RequirementViewModel x:Key="ViewModel"/>
18
        <convert:StringMultiLineConvert x:Key="StringMultiLineConvert"/>
19
    </UserControl.Resources>
20
    <i:Interaction.Triggers>
21
        <i:EventTrigger  EventName="Loaded">
22
            <i:InvokeCommandAction Command="{Binding LoadedCommand}"/>
23
        </i:EventTrigger>
24
        <i:EventTrigger  EventName="Unloaded">
25
            <i:InvokeCommandAction Command="{Binding ClosingCommand}"/>
26
        </i:EventTrigger>
27
    </i:Interaction.Triggers>
28
    <Grid>
29
        <Grid.ColumnDefinitions>
30
            <ColumnDefinition Width="5.7*"/>
31
            <ColumnDefinition Width="Auto"/>
32
            <ColumnDefinition Width="Auto"/>
33
        </Grid.ColumnDefinitions>
34
        <Grid Background="White">
35
                <Grid.RowDefinitions>
36
                    <RowDefinition Height="Auto"/>
37
                    <RowDefinition/>
38
                </Grid.RowDefinitions>
39
                <!--<telerik:RadGridView telerik:StyleManager.Theme="Office2016" AutoGenerateColumns="False" ItemsSource="{Binding RequirementList}" ShowGroupPanel="False"
40
                              CanUserFreezeColumns="False" x:Name="Gridview" SelectedItem="{Binding SelectRequirement}"
41
                              RowIndicatorVisibility="Collapsed" ScrollViewer.HorizontalScrollBarVisibility="Disabled"
42
                              IsExpandedBinding="{Binding IsExpanded,Mode=TwoWay}" IsExpandableBinding="{Binding IsExpandable, Mode=TwoWay}"
43
                             GridLinesVisibility="Horizontal" HorizontalGridLinesBrush="Orange">
44
                    <i:Interaction.Behaviors>
45
                        <Behaviors:ColumnFilterBehavior DefaultOperator="Contains"/>
46
                    </i:Interaction.Behaviors>
47
                    <telerik:RadGridView.Columns>
48
                        <telerik:GridViewDataColumn Header="Commant" IsReadOnly="True" IsFilterable="True"
49
                                            TextAlignment="Left" TextWrapping="WrapWithOverflow"
50
                                            DataMemberBinding="{Binding mdText,Converter={StaticResource StringMultiLineConvert}}">
51
                        </telerik:GridViewDataColumn>
52
                    </telerik:RadGridView.Columns>
53
                </telerik:RadGridView>-->
54
            <Grid>
55
                <Grid.ColumnDefinitions>
56
                    <ColumnDefinition Width="2*"/>
57
                    <ColumnDefinition Width="10"/>
58
                    <ColumnDefinition Width="6*"/>
59
                    <ColumnDefinition Width="10"/>
60
                    <ColumnDefinition Width="2*"/>
61
                </Grid.ColumnDefinitions>
62
                <Grid.RowDefinitions>
63
                    <RowDefinition Height="Auto"/>
64
                    <RowDefinition Height="Auto"/>
65
                </Grid.RowDefinitions>
66
                <controls:DataNavigation HorizontalAlignment="Center" Grid.Column="2"
67
                                         ItemSource="{Binding RequirementList,Mode=TwoWay}"
68
                                         CurrentItem="{Binding SelectRequirement,Mode=TwoWay}"/>
69
                <telerik:RadToggleButton Content="전체 보기" Width="60" Grid.Column="4" Margin="5"
70
                                         Command="{Binding RequirementSearchCommand, Source={StaticResource ViewModel}}"/>
71
                <Line Grid.Row="1" Grid.ColumnSpan="5" Fill="#FFB9B9B9" Margin="5,0" X1="0" X2="1" Y1="1" Stretch="Fill"  Y2="1" Stroke="#FFB0B0B0"/>
72
            </Grid>
73
            <ScrollViewer Grid.Row="1" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto" BorderThickness="1" BorderBrush="Gray">
74
                    <TextBlock Margin="3" TextWrapping="WrapWithOverflow" Text="{Binding SelectRequirement.mdText,Converter={StaticResource StringMultiLineConvert}}"/>
75
                </ScrollViewer>
76
            </Grid>
77
        <Grid Grid.Column="1">
78
            <Grid.RowDefinitions>
79
                <RowDefinition Height="Auto"/>
80
                <RowDefinition  Height="*"/>
81
            </Grid.RowDefinitions>
82
            <Grid.ColumnDefinitions>
83
                <ColumnDefinition Width="Auto"/>
84
                <ColumnDefinition/>
85
            </Grid.ColumnDefinitions>
86
            <Line HorizontalAlignment="Center"  Grid.RowSpan="4" Fill="#FFB9B9B9" Margin="2,5" X1="1" X2="1" Y1="0"  Y2="1"  Stretch="Fill" Stroke="#FFB0B0B0"/>
87
            <StackPanel Grid.Column="1">
88
                <telerik:RadPathButton Width="100" HorizontalAlignment="Left" Content="연결 추가" FontSize="12" Grid.ColumnSpan="2" Margin="15,2,2,2"
89
                                                Command="{Binding AddVPCommentCommand, Source={StaticResource ViewModel}}"
90
                                                ContentPlacement="Left" telerik:StyleManager.Theme="Office2016"
91
                                                CommandParameter="{Binding RelativeSource={RelativeSource AncestorType=telerik:GridViewRow}}"
92
                                                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" >
93
                    <telerik:RadPathButton.PathStyle>
94
                        <Style TargetType="Path">
95
                            <Setter Property="Width" Value="18"/>
96
                            <Setter Property="Height" Value="18"/>
97
                            <Setter Property="Fill" Value="#FF0A93E2" />
98
                            <Setter Property="Stretch" Value="Fill" />
99
                            <Setter Property="HorizontalAlignment" Value="Right" />
100
                            <Setter Property="VerticalAlignment" Value="Center" />
101
                        </Style>
102
                        
103
                    </telerik:RadPathButton.PathStyle>
104
                </telerik:RadPathButton>
105
            </StackPanel>
106
            <telerik:RadGridView x:Name="DetailGridView" GroupRenderMode="Flat" Grid.Row="1"
107
                                                                                BorderThickness="1" Grid.Column="1" telerik:StyleManager.Theme="Office2016"
108
                                                                                GridLinesVisibility="Both" RowIndicatorVisibility="Collapsed" Margin="2,0"
109
                                        ScrollViewer.VerticalScrollBarVisibility="Auto" Width="562"
110
                                        ScrollViewer.HorizontalScrollBarVisibility="Hidden"  ColumnWidth="Auto"
111
                                                                                CanUserFreezeColumns="False" HorizontalGridLinesBrush="#FFB0AFAF"
112
                                                                                AutoGenerateColumns="False" behavior:GridViewAutoWidthBehavior.IsEnabled="True"
113
                                                                                ItemsSource="{Binding SelectRequirement.VpComments}"
114
                                        HorizontalAlignment="Left" Height="Auto"
115
                                                                                ShowGroupPanel="False" SelectedItem="{Binding SelectVPComment, Source={StaticResource ViewModel}}"
116
                                                                                IsReadOnly="True" VerticalAlignment="Top">
117
                <i:Interaction.Triggers>
118
                    <i:EventTrigger  EventName="SelectionChanged">
119
                        <i:InvokeCommandAction Command="{Binding SelectedVPCommentCommand, Source={StaticResource ViewModel}}"/>
120
                    </i:EventTrigger>
121
                </i:Interaction.Triggers>
122
                <telerik:RadGridView.Columns>
123
                    <telerik:GridViewDataColumn DataMemberBinding="{Binding createdByName}" HeaderTextAlignment="Center"  Width="120" IsFilterable="False" IsReadOnly="True"
124
                                                                                                        Header="Create User" />
125
                    <telerik:GridViewDataColumn DataMemberBinding="{Binding comment}" HeaderTextAlignment="Center" Width="*" TextAlignment="Left" IsReadOnly="True" TextTrimming="CharacterEllipsis" IsFilterable="False" 
126
                                                                                                        Header="Comment" />
127
                    <telerik:GridViewDataColumn DataMemberBinding="{Binding condition,Mode=TwoWay}" HeaderTextAlignment="Center" Header="Condition" Width="90"  IsReadOnly="True">
128
                        <telerik:GridViewDataColumn.CellStyle>
129
                            <Style TargetType="telerik:GridViewCell">
130
                                <Setter Property="VerticalContentAlignment" Value="Center"/>
131
                                <Setter Property="HorizontalContentAlignment" Value="Center"/>
132
                                <Setter Property="Margin" Value="0"/>
133
                                <Setter Property="Padding" Value="0"/>
134
                            </Style>
135
                        </telerik:GridViewDataColumn.CellStyle>
136
                    </telerik:GridViewDataColumn>
137
                    <telerik:GridViewDataColumn Width="64" Header="연결 제거" IsFilterable="False" IsReadOnly="True">
138
                        <telerik:GridViewDataColumn.CellTemplate>
139
                            <DataTemplate>
140
                                <telerik:RadPathButton ToolTip="Delete Comment" Height="22" Width="22"
141
                                                Command="{Binding DelVPCommentCommand, Source={StaticResource ViewModel}}"
142
                                                CommandParameter="{Binding RelativeSource={RelativeSource AncestorType=telerik:GridViewRow}}" Background="{x:Null}" BorderBrush="{x:Null}"
143
                                                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">
144
                                </telerik:RadPathButton>
145
                            </DataTemplate>
146
                        </telerik:GridViewDataColumn.CellTemplate>
147
                    </telerik:GridViewDataColumn>
148
                </telerik:RadGridView.Columns>
149
            </telerik:RadGridView>
150
        </Grid>
151
    </Grid>
152
</UserControl>
클립보드 이미지 추가 (최대 크기: 500 MB)