|
5 | 5 | xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
6 | 6 | xmlns:settings="clr-namespace:Rubberduck.UI.Settings"
|
7 | 7 | xmlns:converters="clr-namespace:Rubberduck.UI.Settings.Converters"
|
8 |
| - xmlns:generalConverters="clr-namespace:Rubberduck.UI.GeneralConverters" |
9 | 8 | mc:Ignorable="d"
|
10 | 9 | d:DesignHeight="300" d:DesignWidth="600"
|
11 | 10 | d:DataContext="{d:DesignInstance {x:Type settings:SettingsControlViewModel}, IsDesignTimeCreatable=False}">
|
12 | 11 | <UserControl.Resources>
|
13 |
| - <generalConverters:EqualWidthConverter x:Key="EqualWidthConverter" /> |
14 |
| - |
15 | 12 | <LinearGradientBrush x:Key="{x:Static SystemColors.HighlightBrushKey}" EndPoint="0,1" StartPoint="0,0">
|
16 | 13 | <GradientStop Color="#FFD9F4FF" Offset="0"/>
|
17 | 14 | <GradientStop Color="#FF9BDDFB" Offset="1"/>
|
|
95 | 92 | BorderThickness="0, 1, 0, 0">
|
96 | 93 | <DockPanel VerticalAlignment="Center"
|
97 | 94 | Height="40"
|
98 |
| - Background="{x:Static SystemColors.ControlDarkBrush}"> |
99 |
| - <StackPanel Orientation="Horizontal" |
100 |
| - HorizontalAlignment="Right"> |
101 |
| - <Button Name="ResetButton" |
102 |
| - Content="{Resx ResxName=Rubberduck.UI.RubberduckUI, Key=Settings_ResetSettings}" |
| 95 | + Background="{x:Static SystemColors.ControlDarkBrush}" |
| 96 | + Grid.IsSharedSizeScope="True"> |
| 97 | + <Grid HorizontalAlignment="Right" |
| 98 | + Margin="5,0"> |
| 99 | + <Grid.ColumnDefinitions> |
| 100 | + <ColumnDefinition SharedSizeGroup="SettingsButtons" /> |
| 101 | + <ColumnDefinition SharedSizeGroup="SettingsButtons" /> |
| 102 | + <ColumnDefinition SharedSizeGroup="SettingsButtons" /> |
| 103 | + </Grid.ColumnDefinitions> |
| 104 | + <Button Content="{Resx ResxName=Rubberduck.UI.RubberduckUI, Key=Settings_ResetSettings}" |
103 | 105 | Height="20"
|
104 |
| - HorizontalAlignment="Right" |
105 |
| - Margin="20,0" |
106 |
| - Padding="10,0" |
107 |
| - Command="{Binding ResetButtonCommand}"> |
108 |
| - <Button.MinWidth> |
109 |
| - <MultiBinding Converter="{StaticResource EqualWidthConverter}"> |
110 |
| - <Binding ElementName="OkButton" Path="ActualWidth" /> |
111 |
| - <Binding ElementName="CancelButton" Path="ActualWidth" /> |
112 |
| - </MultiBinding> |
113 |
| - </Button.MinWidth> |
114 |
| - </Button> |
115 |
| - <Button Name="OkButton" |
116 |
| - Content="{Resx ResxName=Rubberduck.UI.RubberduckUI, Key=OK}" |
| 106 | + Margin="10,0" |
| 107 | + Padding="5,0" |
| 108 | + Command="{Binding ResetButtonCommand}" /> |
| 109 | + <Button Content="{Resx ResxName=Rubberduck.UI.RubberduckUI, Key=OK}" |
| 110 | + Grid.Column="1" |
117 | 111 | Height="20"
|
118 |
| - HorizontalAlignment="Left" |
119 | 112 | Margin="5,0"
|
120 | 113 | Padding="10,0"
|
121 |
| - Command="{Binding OKButtonCommand}"> |
122 |
| - <Button.MinWidth> |
123 |
| - <MultiBinding Converter="{StaticResource EqualWidthConverter}"> |
124 |
| - <Binding ElementName="CancelButton" Path="ActualWidth" /> |
125 |
| - <Binding ElementName="ResetButton" Path="ActualWidth" /> |
126 |
| - </MultiBinding> |
127 |
| - </Button.MinWidth> |
128 |
| - </Button> |
129 |
| - <Button Name="CancelButton" |
130 |
| - Content="{Resx ResxName=Rubberduck.UI.RubberduckUI, Key=CancelButtonText}" |
| 114 | + Command="{Binding OKButtonCommand}" /> |
| 115 | + <Button Content="{Resx ResxName=Rubberduck.UI.RubberduckUI, Key=CancelButtonText}" |
| 116 | + Grid.Column="2" |
131 | 117 | Height="20"
|
132 |
| - HorizontalAlignment="Right" |
133 | 118 | Margin="5,0"
|
134 | 119 | Padding="10,0"
|
135 |
| - Command="{Binding CancelButtonCommand}"> |
136 |
| - <Button.MinWidth> |
137 |
| - <MultiBinding Converter="{StaticResource EqualWidthConverter}"> |
138 |
| - <Binding ElementName="OkButton" Path="ActualWidth" /> |
139 |
| - <Binding ElementName="ResetButton" Path="ActualWidth" /> |
140 |
| - </MultiBinding> |
141 |
| - </Button.MinWidth> |
142 |
| - </Button> |
143 |
| - </StackPanel> |
| 120 | + Command="{Binding CancelButtonCommand}" /> |
| 121 | + </Grid> |
144 | 122 | </DockPanel>
|
145 | 123 | </Border>
|
146 | 124 | </Grid>
|
|
0 commit comments