프로젝트

일반

사용자정보

개정판 4fcb686a

ID4fcb686a2d4740f5eee8d44f69429ab17bd7489f
상위 a7bee7cf
하위 5ba8f2d5

김태성이(가) 2년 이상 전에 추가함

issue #000 font가 적용 되지 않아 box size가 작게 출력되는 문제

Change-Id: Ie07531db96d56e8d5c2bbdbf0786d053ad39747c

차이점 보기:

KCOM/Messenger/StyleDictionary.xaml
1
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
2
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
3
                    xmlns:local="clr-namespace:KCOM.Messenger">
1
<ResourceDictionary
2
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
3
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
4
    xmlns:local="clr-namespace:KCOM.Messenger">
4 5

  
5 6

  
6
    <SolidColorBrush x:Key="PhoneAccentBrush" Color="#0084ff"/>
7
    <Style TargetType="TextBlock" x:Key="TextBlockStyle">
8
        <Setter Property="Foreground" Value="#3d3d3d"/>
9
        <Setter Property="Margin" Value="5"/>
10
        <Setter Property="TextWrapping" Value="Wrap"/>
7
    <SolidColorBrush x:Key="PhoneAccentBrush" Color="#0084ff" />
8
    <Style x:Key="TextBlockStyle" TargetType="TextBlock">
9
        <Setter Property="Foreground" Value="#3d3d3d" />
10
        <Setter Property="Margin" Value="5" />
11
        <Setter Property="TextWrapping" Value="Wrap" />
11 12
    </Style>
12 13

  
13
    <Style TargetType="TextBlock" x:Key="TimestampStyle">
14
        <Setter Property="Foreground" Value="#a6a6a4"/>
15
        <Setter Property="Margin" Value="5"/>
16
        <Setter Property="FontSize" Value="10"/>
14
    <Style x:Key="TimestampStyle" TargetType="TextBlock">
15
        <Setter Property="Foreground" Value="#a6a6a4" />
16
        <Setter Property="Margin" Value="5" />
17
        <Setter Property="FontSize" Value="10" />
17 18
        <!--<Setter Property="HorizontalAlignment" Value="Right"/>-->
18 19
    </Style>
19 20
    <DataTemplate x:Key="MeTemplate">
20
        <Grid Margin="30, 10, 5, 0" HorizontalAlignment="Right">
21
        <Grid Margin="30,10,5,0" HorizontalAlignment="Right">
21 22
            <Grid.ColumnDefinitions>
22
                <ColumnDefinition Width="2*"/>
23
                <ColumnDefinition Width="8*"/>
23
                <ColumnDefinition Width="2*" />
24
                <ColumnDefinition Width="8*" />
24 25
            </Grid.ColumnDefinitions>
25 26
            <Grid.RowDefinitions>
26
                <RowDefinition Height="*"/>
27
                <RowDefinition Height="Auto"/>
27
                <RowDefinition Height="*" />
28
                <RowDefinition Height="Auto" />
28 29
            </Grid.RowDefinitions>
29
            <Border Background="{StaticResource PhoneAccentBrush}"  Grid.RowSpan="1" CornerRadius="5" BorderThickness="1" Grid.Column="1" MinHeight="40">
30
            <Border
31
                Grid.RowSpan="1"
32
                Grid.Column="1"
33
                MinHeight="40"
34
                Background="{StaticResource PhoneAccentBrush}"
35
                BorderThickness="1"
36
                CornerRadius="5">
30 37
                <Grid>
31 38
                    <Grid.RowDefinitions>
32
                        <RowDefinition Height="Auto"/>
33
                        <RowDefinition Height="*"/>
39
                        <RowDefinition Height="Auto" />
40
                        <RowDefinition Height="*" />
34 41
                    </Grid.RowDefinitions>
35
                    <TextBlock Text="{Binding Path=TEXT}" Style="{StaticResource TextBlockStyle}" Grid.Column="1" TextWrapping="Wrap"  HorizontalAlignment="Stretch" Grid.Row="1" Foreground="White"/>
36
                    <TextBlock Text="{Binding Path=TIMESTAMP,StringFormat='{}{0:g}'}" Style="{StaticResource TimestampStyle}" Foreground="White"  Grid.Column="1" Grid.Row="0" HorizontalAlignment="Right"  VerticalAlignment="Bottom"/>
37
                    <TextBlock Text="{Binding Path=MEMBER_NAME,StringFormat='{}{0:g}'}" Style="{StaticResource TextBlockStyle}" Foreground="White"  Grid.Column="0" Grid.Row="0" HorizontalAlignment="Left"  VerticalAlignment="Bottom"/>
42
                    <TextBlock
43
                        Grid.Row="1"
44
                        Grid.Column="1"
45
                        HorizontalAlignment="Stretch"
46
                        Foreground="White"
47
                        Style="{StaticResource TextBlockStyle}"
48
                        Text="{Binding Path=TEXT}"
49
                        TextWrapping="Wrap" />
50
                    <TextBlock
51
                        Grid.Row="0"
52
                        Grid.Column="1"
53
                        HorizontalAlignment="Right"
54
                        VerticalAlignment="Bottom"
55
                        Foreground="White"
56
                        Style="{StaticResource TimestampStyle}"
57
                        Text="{Binding Path=TIMESTAMP, StringFormat='{}{0:g}'}" />
58
                    <TextBlock
59
                        Grid.Row="0"
60
                        Grid.Column="0"
61
                        HorizontalAlignment="Left"
62
                        VerticalAlignment="Bottom"
63
                        Foreground="White"
64
                        Style="{StaticResource TextBlockStyle}"
65
                        Text="{Binding Path=MEMBER_NAME, StringFormat='{}{0:g}'}" />
38 66
                </Grid>
39 67
            </Border>
40 68
        </Grid>
41 69
    </DataTemplate>
42 70

  
43 71
    <DataTemplate x:Key="YouTemplate_V2">
44
        <Grid Margin="5, 10, 30, 0" HorizontalAlignment="Left">
72
        <Grid Margin="5,10,30,0" HorizontalAlignment="Left">
45 73
            <Grid.ColumnDefinitions>
46
                <ColumnDefinition Width="Auto"/>
47
                <ColumnDefinition Width="*"/>
48
                <ColumnDefinition Width="Auto"/>
74
                <ColumnDefinition Width="Auto" />
75
                <ColumnDefinition Width="*" />
76
                <ColumnDefinition Width="Auto" />
49 77
            </Grid.ColumnDefinitions>
50 78
            <Grid.RowDefinitions>
51
                <RowDefinition Height="Auto"/>
52
                <RowDefinition Height="*"/>
79
                <RowDefinition Height="Auto" />
80
                <RowDefinition Height="*" />
53 81
                <!--<RowDefinition Height="Auto"/>-->
54 82
            </Grid.RowDefinitions>
55
            <Border Background="White"  Grid.RowSpan="2" CornerRadius="5" BorderThickness="1" Grid.Row="1" Grid.Column="1">
56

  
57
            </Border>
58
            <TextBlock Text="{Binding Path=MEMBER_NAME}" Grid.Row="0" Grid.Column="1" Margin="0,5"/>
59
            <TextBlock Text="{Binding Path=TEXT}" Grid.Row="1" Grid.Column="1"
60
                             Style="{StaticResource TextBlockStyle}"/>
61
            <TextBlock Text="{Binding Path=TIMESTAMP,StringFormat='{}{0:g}'}" HorizontalAlignment="Right" 
62
                             Style="{StaticResource TimestampStyle}" Margin="5,0"
63
                             Grid.Row="1"  Grid.Column="2" VerticalAlignment="Bottom"/>
83
            <Border
84
                Grid.Row="1"
85
                Grid.RowSpan="2"
86
                Grid.Column="1"
87
                Background="White"
88
                BorderThickness="1"
89
                CornerRadius="5" />
90
            <TextBlock
91
                Grid.Row="0"
92
                Grid.Column="1"
93
                Margin="0,5"
94
                Text="{Binding Path=MEMBER_NAME}" />
95
            <TextBlock
96
                Grid.Row="1"
97
                Grid.Column="1"
98
                Style="{StaticResource TextBlockStyle}"
99
                Text="{Binding Path=TEXT}" />
100
            <TextBlock
101
                Grid.Row="1"
102
                Grid.Column="2"
103
                Margin="5,0"
104
                HorizontalAlignment="Right"
105
                VerticalAlignment="Bottom"
106
                Style="{StaticResource TimestampStyle}"
107
                Text="{Binding Path=TIMESTAMP, StringFormat='{}{0:g}'}" />
64 108
        </Grid>
65 109
    </DataTemplate>
66 110

  
67 111
    <DataTemplate x:Key="YouTemplate">
68
        <Grid Margin="5, 10, 30, 0" HorizontalAlignment="Left">
112
        <Grid Margin="5,10,30,0" HorizontalAlignment="Left">
69 113
            <Grid.ColumnDefinitions>
70
                <ColumnDefinition Width="Auto"/>
71
                <ColumnDefinition Width="*"/>
72
                <ColumnDefinition Width="Auto"/>
114
                <ColumnDefinition Width="Auto" />
115
                <ColumnDefinition Width="*" />
116
                <ColumnDefinition Width="Auto" />
73 117
            </Grid.ColumnDefinitions>
74 118
            <Grid.RowDefinitions>
75
                <RowDefinition Height="Auto"/>
76
                <RowDefinition Height="*"/>
119
                <RowDefinition Height="Auto" />
120
                <RowDefinition Height="*" />
77 121
                <!--<RowDefinition Height="Auto"/>-->
78 122
            </Grid.RowDefinitions>
79 123

  
80
            <Ellipse Height="32" Width="32" Name="elipsemedia" Margin="5" Grid.RowSpan="3" VerticalAlignment="Top">
124
            <Ellipse
125
                Name="elipsemedia"
126
                Grid.RowSpan="3"
127
                Width="32"
128
                Height="32"
129
                Margin="5"
130
                VerticalAlignment="Top">
81 131
                <Ellipse.Fill>
82
                    <ImageBrush ImageSource="user.png"/>
132
                    <ImageBrush ImageSource="user.png" />
83 133
                </Ellipse.Fill>
84 134
            </Ellipse>
85 135
            <!--<Path Data="m 0,0 l 0,16 l 16,0 l -16,-16"
86 136
                        Fill="{StaticResource PhoneAccentBrush}"
87 137
                        Margin="0,0,0,0" Grid.Row="0"
88 138
                        HorizontalAlignment="Left"/>-->
89
            <Border Background="White"  Grid.RowSpan="2" CornerRadius="5" BorderThickness="1" Grid.Row="1" Grid.Column="1">
139
            <Border
140
                Grid.Row="1"
141
                Grid.RowSpan="2"
142
                Grid.Column="1"
143
                Background="White"
144
                BorderThickness="1"
145
                CornerRadius="5">
90 146
                <Grid>
91 147
                    <Grid.RowDefinitions>
92
                        <RowDefinition Height="Auto"/>
93
                        <RowDefinition Height="*"/>
148
                        <RowDefinition Height="Auto" />
149
                        <RowDefinition Height="*" />
94 150
                    </Grid.RowDefinitions>
95
                    <TextBlock Text="{Binding Path=MEMBER_NAME}" Grid.Row="0" Grid.Column="1" Margin="5,5"
96
                               FontSize="12" VerticalAlignment="Bottom" Foreground="#FF828080"/>
97
                    <TextBlock Text="{Binding Path=TEXT}" Grid.Row="1" Style="{StaticResource TextBlockStyle}"/>
98
                    <TextBlock Text="{Binding Path=TIMESTAMP,StringFormat='{}{0:g}'}" HorizontalAlignment="Right" 
99
                             Style="{StaticResource TimestampStyle}" Margin="5,5" Grid.Column="1" VerticalAlignment="Center"/>
151
                    <TextBlock
152
                        Grid.Row="0"
153
                        Grid.Column="1"
154
                        Margin="5,5"
155
                        VerticalAlignment="Bottom"
156
                        FontSize="12"
157
                        Foreground="#FF828080"
158
                        Text="{Binding Path=MEMBER_NAME}" />
159
                    <TextBlock
160
                        Grid.Row="1"
161
                        Style="{StaticResource TextBlockStyle}"
162
                        Text="{Binding Path=TEXT}" />
163
                    <TextBlock
164
                        Grid.Column="1"
165
                        Margin="5,5"
166
                        HorizontalAlignment="Right"
167
                        VerticalAlignment="Center"
168
                        Style="{StaticResource TimestampStyle}"
169
                        Text="{Binding Path=TIMESTAMP, StringFormat='{}{0:g}'}" />
100 170
                </Grid>
101 171
            </Border>
102 172

  
......
105 175
    </DataTemplate>
106 176

  
107 177
    <DataTemplate x:Key="MeTemplate_Anchor">
108
        <Grid Margin="30, 10, 5, 0" HorizontalAlignment="Right">
178
        <Grid Margin="30,10,5,0" HorizontalAlignment="Right">
109 179
            <Grid.ColumnDefinitions>
110
                <ColumnDefinition Width="2*"/>
111
                <ColumnDefinition Width="8*"/>
180
                <ColumnDefinition Width="2*" />
181
                <ColumnDefinition Width="8*" />
112 182
            </Grid.ColumnDefinitions>
113 183
            <Grid.RowDefinitions>
114
                <RowDefinition Height="*"/>
115
                <RowDefinition Height="Auto"/>
184
                <RowDefinition Height="*" />
185
                <RowDefinition Height="Auto" />
116 186
            </Grid.RowDefinitions>
117
            <Border Background="{StaticResource PhoneAccentBrush}"  Grid.RowSpan="1" CornerRadius="5" BorderThickness="1" Grid.Column="1" MinHeight="40">
187
            <Border
188
                Grid.RowSpan="1"
189
                Grid.Column="1"
190
                MinHeight="40"
191
                Background="{StaticResource PhoneAccentBrush}"
192
                BorderThickness="1"
193
                CornerRadius="5">
118 194
                <Grid>
119 195
                    <Grid.RowDefinitions>
120
                        <RowDefinition Height="Auto"/>
121
                        <RowDefinition Height="*"/>
122
                        <RowDefinition Height="Auto"/>
196
                        <RowDefinition Height="Auto" />
197
                        <RowDefinition Height="*" />
198
                        <RowDefinition Height="Auto" />
123 199
                    </Grid.RowDefinitions>
124
                    <TextBlock Text="{Binding Path=TIMESTAMP,StringFormat='{}{0:g}'}" Style="{StaticResource TimestampStyle}" Foreground="White"  Grid.Column="1" Grid.Row="0" HorizontalAlignment="Right"  VerticalAlignment="Bottom"/>
125
                    <TextBlock Text="{Binding Path=MEMBER_NAME,StringFormat='{}{0:g}'}" Style="{StaticResource TextBlockStyle}" Foreground="White"  Grid.Column="0" Grid.Row="0" HorizontalAlignment="Left"  VerticalAlignment="Bottom"/>
200
                    <TextBlock
201
                        Grid.Row="0"
202
                        Grid.Column="1"
203
                        HorizontalAlignment="Right"
204
                        VerticalAlignment="Bottom"
205
                        Foreground="White"
206
                        Style="{StaticResource TimestampStyle}"
207
                        Text="{Binding Path=TIMESTAMP, StringFormat='{}{0:g}'}" />
208
                    <TextBlock
209
                        Grid.Row="0"
210
                        Grid.Column="0"
211
                        HorizontalAlignment="Left"
212
                        VerticalAlignment="Bottom"
213
                        Foreground="White"
214
                        Style="{StaticResource TextBlockStyle}"
215
                        Text="{Binding Path=MEMBER_NAME, StringFormat='{}{0:g}'}" />
126 216

  
127
                    <TextBlock Text="{Binding Path=TEXT}" Style="{StaticResource TextBlockStyle}" Grid.Column="1" TextWrapping="Wrap"  HorizontalAlignment="Stretch" Grid.Row="1" Foreground="White"/>
128
                    <Border Background="#2263b0" CornerRadius="3" HorizontalAlignment="Right" Grid.Row="2" Margin="5">
129
                        <Button BorderThickness="0" Content="Review Comment" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="White" Background="Transparent" Padding="5"
130
                                Command="{Binding ClickAnchorCommand, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type local:ConversationView}}}" CommandParameter="{Binding}"/>
217
                    <TextBlock
218
                        Grid.Row="1"
219
                        Grid.Column="1"
220
                        HorizontalAlignment="Stretch"
221
                        Foreground="White"
222
                        Style="{StaticResource TextBlockStyle}"
223
                        Text="{Binding Path=TEXT}"
224
                        TextWrapping="Wrap" />
225
                    <Border
226
                        Grid.Row="2"
227
                        Margin="5"
228
                        HorizontalAlignment="Right"
229
                        Background="#2263b0"
230
                        CornerRadius="3">
231
                        <Button
232
                            Padding="5"
233
                            HorizontalAlignment="Center"
234
                            VerticalAlignment="Center"
235
                            Background="Transparent"
236
                            BorderThickness="0"
237
                            Command="{Binding ClickAnchorCommand, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type local:ConversationView}}}"
238
                            CommandParameter="{Binding}"
239
                            Content="Review Comment"
240
                            Foreground="White" />
131 241
                    </Border>
132 242
                </Grid>
133 243
            </Border>
......
142 252
    </DataTemplate>
143 253

  
144 254
    <DataTemplate x:Key="YouTemplate_Anchor">
145
        <Grid Margin="5, 10, 30, 0" HorizontalAlignment="Left">
255
        <Grid Margin="5,10,30,0" HorizontalAlignment="Left">
146 256
            <Grid.ColumnDefinitions>
147
                <ColumnDefinition Width="2*"/>
148
                <ColumnDefinition Width="8*"/>
257
                <ColumnDefinition Width="2*" />
258
                <ColumnDefinition Width="8*" />
149 259
            </Grid.ColumnDefinitions>
150 260
            <Grid.RowDefinitions>
151
                <RowDefinition Height="*"/>
152
                <RowDefinition Height="Auto"/>
261
                <RowDefinition Height="*" />
262
                <RowDefinition Height="Auto" />
153 263
            </Grid.RowDefinitions>
154
            <Ellipse Height="32" Width="32" Name="elipsemedia" Margin="5" Grid.RowSpan="3" VerticalAlignment="Top">
264
            <Ellipse
265
                Name="elipsemedia"
266
                Grid.RowSpan="3"
267
                Width="32"
268
                Height="32"
269
                Margin="5"
270
                VerticalAlignment="Top">
155 271
                <Ellipse.Fill>
156
                    <ImageBrush ImageSource="user.png"/>
272
                    <ImageBrush ImageSource="user.png" />
157 273
                </Ellipse.Fill>
158 274
            </Ellipse>
159 275

  
160
            <Border Background="White"  Grid.RowSpan="1" CornerRadius="5" BorderThickness="1" Grid.Column="1" MinHeight="40">
276
            <Border
277
                Grid.RowSpan="1"
278
                Grid.Column="1"
279
                MinHeight="40"
280
                Background="White"
281
                BorderThickness="1"
282
                CornerRadius="5">
161 283
                <Grid>
162 284
                    <Grid.RowDefinitions>
163
                        <RowDefinition Height="Auto"/>
164
                        <RowDefinition Height="*"/>
165
                        <RowDefinition Height="Auto"/>
285
                        <RowDefinition Height="Auto" />
286
                        <RowDefinition Height="*" />
287
                        <RowDefinition Height="Auto" />
166 288
                    </Grid.RowDefinitions>
167
                    <TextBlock Text="{Binding Path=TIMESTAMP,StringFormat='{}{0:g}'}" Style="{StaticResource TimestampStyle}" Grid.Row="0" HorizontalAlignment="Right"  VerticalAlignment="Bottom"/>
168
                    <TextBlock Text="{Binding Path=MEMBER_NAME}" Grid.Row="0" Grid.Column="1" Margin="5,5"
169
                               FontSize="12" VerticalAlignment="Bottom" Foreground="#FF828080"/>
170
                    <TextBlock Text="{Binding Path=TEXT}" Style="{StaticResource TextBlockStyle}" Grid.Column="1" TextWrapping="Wrap"  HorizontalAlignment="Stretch" Grid.Row="1"/>
171
                    <Border Background="#2263b0" CornerRadius="3" HorizontalAlignment="Right" Grid.Row="2" Margin="5">
172
                        <Button BorderThickness="0" Content="코멘트 확인" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="White" Background="Transparent" Padding="5"
173
                                Command="{Binding ClickAnchorCommand}" CommandParameter="{Binding}"/>
289
                    <TextBlock
290
                        Grid.Row="0"
291
                        HorizontalAlignment="Right"
292
                        VerticalAlignment="Bottom"
293
                        Style="{StaticResource TimestampStyle}"
294
                        Text="{Binding Path=TIMESTAMP, StringFormat='{}{0:g}'}" />
295
                    <TextBlock
296
                        Grid.Row="0"
297
                        Grid.Column="1"
298
                        Margin="5,5"
299
                        VerticalAlignment="Bottom"
300
                        FontSize="12"
301
                        Foreground="#FF828080"
302
                        Text="{Binding Path=MEMBER_NAME}" />
303
                    <TextBlock
304
                        Grid.Row="1"
305
                        Grid.Column="1"
306
                        HorizontalAlignment="Stretch"
307
                        Style="{StaticResource TextBlockStyle}"
308
                        Text="{Binding Path=TEXT}"
309
                        TextWrapping="Wrap" />
310
                    <Border
311
                        Grid.Row="2"
312
                        Margin="5"
313
                        HorizontalAlignment="Right"
314
                        Background="#2263b0"
315
                        CornerRadius="3">
316
                        <Button
317
                            Padding="5"
318
                            HorizontalAlignment="Center"
319
                            VerticalAlignment="Center"
320
                            Background="Transparent"
321
                            BorderThickness="0"
322
                            Command="{Binding ClickAnchorCommand}"
323
                            CommandParameter="{Binding}"
324
                            Content="코멘트 확인"
325
                            Foreground="White" />
174 326
                    </Border>
175 327
                </Grid>
176 328
            </Border>

내보내기 Unified diff

클립보드 이미지 추가 (최대 크기: 500 MB)