ColorPickerControl finally doesn't set database to dirty when there is an initial value

This commit is contained in:
Geoffroy BONNEVILLE
2020-05-20 17:40:06 +02:00
parent 643fb9a3f2
commit 45b5ae5630
5 changed files with 81 additions and 25 deletions

View File

@@ -6,10 +6,14 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d">
<ComboBox x:Name="ComboBox"
ItemsSource="{Binding Colors, ElementName=UserControl}"
SelectedValue="{Binding SelectedColor, ElementName=UserControl, Mode=TwoWay}"
SelectedValuePath="ColorBrush"
IsEnabled="{Binding IsEnabled, ElementName=UserControl}">
DataContext="{Binding Source={StaticResource Locator}, Path=ColorPicker}"
ItemsSource="{Binding Colors}"
SelectedItem="{Binding SelectedItem}"
SelectedValue="{Binding SelectedColor, ElementName=UserControl}"
SelectedValuePath="ColorBrush"
Loaded="ComboBox_OnLoaded"
SelectionChanged="ComboBox_OnSelectionChanged"
IsEnabled="{Binding IsEnabled, ElementName=UserControl}">
<ComboBox.ItemTemplate>
<DataTemplate>
<StackPanel Orientation="Horizontal" Margin="0,0,10,0">