fixed bug - combox show correct current value when swithed language

This commit is contained in:
2026-08-09 00:20:11 +05:00
parent b581d560b0
commit 253373d47e
+9 -5
View File
@@ -17,6 +17,10 @@
<local:ColorToBrushConverter x:Key="ColorToBrush" /> <local:ColorToBrushConverter x:Key="ColorToBrush" />
<local:ColorToHexConverter x:Key="ColorToHex" /> <local:ColorToHexConverter x:Key="ColorToHex" />
<DataTemplate x:Key="EnumOptionTemplate">
<TextBlock Text="{Binding Display}" />
</DataTemplate>
<Style TargetType="TextBlock" x:Key="FieldLabel"> <Style TargetType="TextBlock" x:Key="FieldLabel">
<Setter Property="VerticalAlignment" Value="Center" /> <Setter Property="VerticalAlignment" Value="Center" />
<Setter Property="Margin" Value="0,0,12,0" /> <Setter Property="Margin" Value="0,0,12,0" />
@@ -57,7 +61,7 @@
Text="{Binding Localization[ThemeLabel]}" /> Text="{Binding Localization[ThemeLabel]}" />
<ComboBox Grid.Row="1" Grid.Column="1" Margin="0,12,0,0" <ComboBox Grid.Row="1" Grid.Column="1" Margin="0,12,0,0"
ItemsSource="{Binding Themes}" ItemsSource="{Binding Themes}"
DisplayMemberPath="Display" ItemTemplate="{StaticResource EnumOptionTemplate}"
SelectedValuePath="Value" SelectedValuePath="Value"
SelectedValue="{Binding Settings.Theme}" /> SelectedValue="{Binding Settings.Theme}" />
</Grid> </Grid>
@@ -84,7 +88,7 @@
Text="{Binding Localization[PlacementModeLabel]}" /> Text="{Binding Localization[PlacementModeLabel]}" />
<ComboBox Grid.Column="1" Grid.ColumnSpan="2" <ComboBox Grid.Column="1" Grid.ColumnSpan="2"
ItemsSource="{Binding PlacementModes}" ItemsSource="{Binding PlacementModes}"
DisplayMemberPath="Display" ItemTemplate="{StaticResource EnumOptionTemplate}"
SelectedValuePath="Value" SelectedValuePath="Value"
SelectedValue="{Binding Settings.PlacementMode}" /> SelectedValue="{Binding Settings.PlacementMode}" />
@@ -97,7 +101,7 @@
ConverterParameter=AtCursor}" /> ConverterParameter=AtCursor}" />
<ComboBox Grid.Row="1" Grid.Column="1" Grid.ColumnSpan="2" Margin="0,12,0,0" <ComboBox Grid.Row="1" Grid.Column="1" Grid.ColumnSpan="2" Margin="0,12,0,0"
ItemsSource="{Binding AnchorSides}" ItemsSource="{Binding AnchorSides}"
DisplayMemberPath="Display" ItemTemplate="{StaticResource EnumOptionTemplate}"
SelectedValuePath="Value" SelectedValuePath="Value"
SelectedValue="{Binding Settings.CursorSide}" SelectedValue="{Binding Settings.CursorSide}"
Visibility="{Binding Settings.PlacementMode, Visibility="{Binding Settings.PlacementMode,
@@ -132,7 +136,7 @@
ConverterParameter=AtCaret}" /> ConverterParameter=AtCaret}" />
<ComboBox Grid.Row="3" Grid.Column="1" Grid.ColumnSpan="2" Margin="0,12,0,0" <ComboBox Grid.Row="3" Grid.Column="1" Grid.ColumnSpan="2" Margin="0,12,0,0"
ItemsSource="{Binding AnchorSides}" ItemsSource="{Binding AnchorSides}"
DisplayMemberPath="Display" ItemTemplate="{StaticResource EnumOptionTemplate}"
SelectedValuePath="Value" SelectedValuePath="Value"
SelectedValue="{Binding Settings.CaretSide}" SelectedValue="{Binding Settings.CaretSide}"
Visibility="{Binding Settings.PlacementMode, Visibility="{Binding Settings.PlacementMode,
@@ -167,7 +171,7 @@
ConverterParameter=FixedPoint}" /> ConverterParameter=FixedPoint}" />
<ComboBox Grid.Row="5" Grid.Column="1" Grid.ColumnSpan="2" Margin="0,12,0,0" <ComboBox Grid.Row="5" Grid.Column="1" Grid.ColumnSpan="2" Margin="0,12,0,0"
ItemsSource="{Binding ScreenPositions}" ItemsSource="{Binding ScreenPositions}"
DisplayMemberPath="Display" ItemTemplate="{StaticResource EnumOptionTemplate}"
SelectedValuePath="Value" SelectedValuePath="Value"
SelectedValue="{Binding Settings.ScreenPosition}" SelectedValue="{Binding Settings.ScreenPosition}"
Visibility="{Binding Settings.PlacementMode, Visibility="{Binding Settings.PlacementMode,