Try OneWayToSource binding mode

This commit is contained in:
wieslawsoltes 2018-11-20 10:49:20 +00:00
Родитель f9e65403b9
Коммит 99d39d2a47
1 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -9,7 +9,7 @@
xmlns:cp="clr-namespace:ThemeEditor.Controls.ColorPicker;assembly=ThemeEditor.Controls.ColorPicker"
mc:Ignorable="d"
d:DesignWidth="900" d:DesignHeight="500"
Classes="{Binding #themes.SelectedItem}">
Classes="Dark">
<Grid ColumnDefinitions="*,8,300" Margin="8">
<TabControl Grid.Column="0" Classes="main">
<TabItem Header="Preview" Classes="main">
@ -34,7 +34,7 @@
</TabControl>
<GridSplitter Width="8" Grid.Column="1"/>
<Grid RowDefinitions="Auto,*" Grid.Column="2">
<DropDown x:Name="themes" SelectedIndex="1" Classes="themes" Grid.Row="0">
<DropDown x:Name="themes" SelectedItem="{Binding $parent[UserControl].Classes, Mode=OneWayToSource}" Classes="themes" Grid.Row="0">
<DropDownItem>Light</DropDownItem>
<DropDownItem>Dark</DropDownItem>
</DropDown>