|
6 | 6 | xmlns:vm="using:SourceGit.ViewModels"
|
7 | 7 | xmlns:v="using:SourceGit.Views"
|
8 | 8 | xmlns:c="using:SourceGit.Converters"
|
| 9 | + xmlns:ac="using:Avalonia.Controls.Converters" |
9 | 10 | mc:Ignorable="d" d:DesignWidth="500" d:DesignHeight="450"
|
10 | 11 | x:Class="SourceGit.Views.CreateBranch"
|
11 | 12 | x:DataType="vm:CreateBranch">
|
|
60 | 61 | Margin="0,0,8,0"
|
61 | 62 | Text="{DynamicResource Text.CreateBranch.LocalChanges}"/>
|
62 | 63 | <StackPanel Grid.Row="2" Grid.Column="1" Orientation="Horizontal">
|
| 64 | + <StackPanel.Resources> |
| 65 | + <ac:EnumToBoolConverter x:Key="EnumToBoolConverter"/> |
| 66 | + </StackPanel.Resources> |
| 67 | + |
63 | 68 | <RadioButton Content="{DynamicResource Text.CreateBranch.LocalChanges.StashAndReply}"
|
64 | 69 | GroupName="LocalChanges"
|
65 |
| - IsChecked="{Binding PreAction, Mode=TwoWay, Converter={x:Static c:EnumConverters.Equals}, ConverterParameter={x:Static vm:BeforeCreateBranchAction.StashAndReaply}}"/> |
| 70 | + IsChecked="{Binding PreAction, Mode=TwoWay, Converter={StaticResource EnumToBoolConverter}, ConverterParameter={x:Static vm:BeforeCreateBranchAction.StashAndReaply}}"/> |
66 | 71 | <RadioButton Content="{DynamicResource Text.CreateBranch.LocalChanges.Discard}"
|
67 | 72 | GroupName="LocalChanges"
|
68 | 73 | Margin="8,0,0,0"
|
69 |
| - IsChecked="{Binding PreAction, Mode=TwoWay, Converter={x:Static c:EnumConverters.Equals}, ConverterParameter={x:Static vm:BeforeCreateBranchAction.Discard}}"/> |
| 74 | + IsChecked="{Binding PreAction, Mode=TwoWay, Converter={StaticResource EnumToBoolConverter}, ConverterParameter={x:Static vm:BeforeCreateBranchAction.Discard}}"/> |
70 | 75 | <RadioButton Content="{DynamicResource Text.CreateBranch.LocalChanges.DoNothing}"
|
71 | 76 | GroupName="LocalChanges"
|
72 | 77 | Margin="8,0,0,0"
|
73 |
| - IsChecked="{Binding PreAction, Mode=TwoWay, Converter={x:Static c:EnumConverters.Equals}, ConverterParameter={x:Static vm:BeforeCreateBranchAction.DoNothing}}"/> |
| 78 | + IsChecked="{Binding PreAction, Mode=TwoWay, Converter={StaticResource EnumToBoolConverter}, ConverterParameter={x:Static vm:BeforeCreateBranchAction.DoNothing}}"/> |
74 | 79 | </StackPanel>
|
75 | 80 |
|
76 | 81 | <CheckBox Grid.Row="3" Grid.Column="1"
|
|
0 commit comments