|
12 | 12 | <cache:SharedDictionaryManager Source="pack://application:,,,/GitHub.VisualStudio;component/SharedDictionary.xaml"/>
|
13 | 13 | <cache:SharedDictionaryManager Source="pack://application:,,,/GitHub.UI;component/SharedDictionary.xaml" />
|
14 | 14 | </ResourceDictionary.MergedDictionaries>
|
15 |
| - <ui:BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter" /> |
16 |
| - <ui:DurationToStringConverter x:Key="DurationToStringConverter" /> |
17 |
| - |
| 15 | + |
18 | 16 | <DataTemplate x:Key="PullRequestItemTemplate" DataType="models:IPullRequestModel">
|
19 | 17 | <Grid>
|
20 | 18 | <Grid.RowDefinitions>
|
|
70 | 68 | Width="16"
|
71 | 69 | Height="16"
|
72 | 70 | VerticalAlignment="Top"
|
73 |
| - Foreground="{DynamicResource GitHubVsToolWindowText}"> |
74 |
| - <!-- |
75 |
| - <ui:OcticonImage.Style> |
76 |
| - <Style> |
77 |
| - <Style.Triggers> |
78 |
| - <DataTrigger Binding="{Binding CommentCount}" Value="0"> |
79 |
| - <Setter Property="FrameworkElement.IsEnabled" Value="False" /> |
80 |
| - </DataTrigger> |
81 |
| - </Style.Triggers> |
82 |
| - </Style> |
83 |
| - </ui:OcticonImage.Style> |
84 |
| - --> |
85 |
| - </ui:OcticonImage> |
| 71 | + Foreground="{DynamicResource GitHubVsToolWindowText}" |
| 72 | + Visibility="{Binding CommentCount, Converter={ui:CountToVisibilityConverter}}" /> |
86 | 73 |
|
87 | 74 | <TextBlock x:Name="comment_count"
|
88 | 75 | Grid.Row="0"
|
|
92 | 79 | VerticalAlignment="Top"
|
93 | 80 | FontFamily="Segoe UI"
|
94 | 81 | Foreground="{DynamicResource GitHubVsToolWindowText}"
|
95 |
| - Text="{Binding CommentCount}"> |
96 |
| - <TextBlock.Style> |
97 |
| - <Style> |
98 |
| - <Style.Triggers> |
99 |
| - <DataTrigger Binding="{Binding CommentCount}" Value="0"> |
100 |
| - <Setter Property="FrameworkElement.IsEnabled" Value="False" /> |
101 |
| - </DataTrigger> |
102 |
| - </Style.Triggers> |
103 |
| - </Style> |
104 |
| - </TextBlock.Style> |
105 |
| - </TextBlock> |
| 82 | + Text="{Binding CommentCount}" |
| 83 | + Visibility="{Binding CommentCount, Converter={ui:CountToVisibilityConverter}}" /> |
106 | 84 |
|
107 | 85 | <ui:OcticonImage x:Name="comment_new"
|
108 | 86 | Grid.Row="0"
|
|
115 | 93 | Margin="0,3"
|
116 | 94 | Foreground="Green"
|
117 | 95 | Icon="primitive_dot"
|
118 |
| - Visibility="{Binding HasNewComments, |
119 |
| - Converter={StaticResource BooleanToVisibilityConverter}}" /> |
| 96 | + Visibility="{Binding HasNewComments, Converter={ui:BooleanToVisibilityConverter}}" /> |
120 | 97 | <Grid x:Name="status"
|
121 | 98 | Grid.Row="1"
|
122 | 99 | Grid.Column="1"
|
|
141 | 118 | Foreground="{DynamicResource GitHubVsGrayText}">
|
142 | 119 | <TextBlock.Text>
|
143 | 120 | <MultiBinding StringFormat="{} {0} {1} {2}">
|
144 |
| - <Binding Converter="{StaticResource DurationToStringConverter}" Path="UpdatedAt" /> |
| 121 | + <Binding Converter="{ui:DurationToStringConverter}" Path="UpdatedAt" /> |
145 | 122 | <Binding Source="{x:Static i18n:Resources.prOpenedByText}" />
|
146 | 123 | <Binding Path="Author.Login" />
|
147 | 124 | </MultiBinding>
|
|
153 | 130 | <TextBlock.Text>
|
154 | 131 | <MultiBinding StringFormat="{} {0} {1} {2} {3}">
|
155 | 132 | <Binding Source="{x:Static i18n:Resources.prOpenedText}" />
|
156 |
| - <Binding Converter="{StaticResource DurationToStringConverter}" Path="UpdatedAt" /> |
| 133 | + <Binding Converter="{ui:DurationToStringConverter}" Path="UpdatedAt" /> |
157 | 134 | <Binding Source="{x:Static i18n:Resources.prOpenedByText}" />
|
158 | 135 | <Binding Path="Author.Login" />
|
159 | 136 | </MultiBinding>
|
|
0 commit comments