|
2 | 2 | xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
3 | 3 | xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
4 | 4 | xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
| 5 | + xmlns:m="using:SourceGit.Models" |
5 | 6 | xmlns:vm="using:SourceGit.ViewModels"
|
6 | 7 | xmlns:c="using:SourceGit.Converters"
|
7 | 8 | mc:Ignorable="d" d:DesignWidth="500" d:DesignHeight="450"
|
|
14 | 15 |
|
15 | 16 | <Grid Margin="0,16,0,8" RowDefinitions="32,32" ColumnDefinitions="120,*">
|
16 | 17 | <TextBlock Grid.Row="0" Grid.Column="0" Margin="0,0,8,0" HorizontalAlignment="Right" Text="{DynamicResource Text.Discard.Changes}"/>
|
17 |
| - <ContentControl Grid.Row="0" Grid.Column="1"> |
18 |
| - <ContentControl.Content> |
19 |
| - <Binding Path="Mode"> |
20 |
| - <Binding.TargetNullValue> |
21 |
| - <StackPanel Orientation="Horizontal"> |
22 |
| - <Path Width="12" Height="12" Margin="0,2,0,0" Data="{StaticResource Icons.Folder.Open}"/> |
23 |
| - <TextBlock Text="{DynamicResource Text.Discard.All}" Margin="4,0,0,0"/> |
24 |
| - </StackPanel> |
25 |
| - </Binding.TargetNullValue> |
26 |
| - </Binding> |
27 |
| - </ContentControl.Content> |
28 |
| - |
| 18 | + <ContentControl Grid.Row="0" Grid.Column="1" Content="{Binding Mode}"> |
29 | 19 | <ContentControl.DataTemplates>
|
| 20 | + <DataTemplate DataType="m:Null"> |
| 21 | + <StackPanel Orientation="Horizontal"> |
| 22 | + <Path Width="12" Height="12" Margin="0,2,0,0" Data="{StaticResource Icons.Folder.Open}"/> |
| 23 | + <TextBlock Text="{DynamicResource Text.Discard.All}" Margin="4,0,0,0"/> |
| 24 | + </StackPanel> |
| 25 | + </DataTemplate> |
| 26 | + |
30 | 27 | <DataTemplate DataType="x:String">
|
31 | 28 | <StackPanel Orientation="Horizontal">
|
32 | 29 | <Path Width="12" Height="12" Data="{StaticResource Icons.File}"/>
|
|
37 | 34 | <DataTemplate DataType="x:Int32">
|
38 | 35 | <StackPanel Orientation="Horizontal">
|
39 | 36 | <Path Width="12" Height="12" Data="{StaticResource Icons.File}"/>
|
40 |
| - <TextBlock Text="{Binding, Converter={x:Static c:StringConverters.FormatByResourceKey}, ConverterParameter='Discard.Total'}" Margin="4,0,0,0"/> |
| 37 | + <TextBlock Text="{Binding Converter={x:Static c:StringConverters.FormatByResourceKey}, ConverterParameter='Discard.Total'}" Margin="4,0,0,0"/> |
41 | 38 | </StackPanel>
|
42 | 39 | </DataTemplate>
|
43 | 40 | </ContentControl.DataTemplates>
|
|
0 commit comments