diff --git a/demo/Semi.Avalonia.Demo/Pages/ColorPickerDemo.axaml b/demo/Semi.Avalonia.Demo/Pages/ColorPickerDemo.axaml index 65a3b2f..cb5dfaf 100644 --- a/demo/Semi.Avalonia.Demo/Pages/ColorPickerDemo.axaml +++ b/demo/Semi.Avalonia.Demo/Pages/ColorPickerDemo.axaml @@ -15,7 +15,7 @@ VerticalAlignment="Top" Orientation="Horizontal" Spacing="20"> - + @@ -23,9 +23,14 @@ VerticalAlignment="Top" Orientation="Horizontal"> + + + + diff --git a/src/Semi.Avalonia.ColorPicker/Controls/ColorPicker.axaml b/src/Semi.Avalonia.ColorPicker/Controls/ColorPicker.axaml index c4a05e4..514af34 100644 --- a/src/Semi.Avalonia.ColorPicker/Controls/ColorPicker.axaml +++ b/src/Semi.Avalonia.ColorPicker/Controls/ColorPicker.axaml @@ -579,7 +579,7 @@ AutomationProperties.Name="Third Component" ColorComponent="{Binding #ColorSpectrum.ThirdComponent}" ColorModel="Hsva" - HsvColor="{Binding #ColorSpectrum.HsvColor}" + HsvColor="{TemplateBinding HsvColor, Mode=TwoWay}" IsVisible="{TemplateBinding IsColorSpectrumSliderVisible}" Orientation="Horizontal" /> @@ -591,7 +591,7 @@ AutomationProperties.Name="Alpha Component" ColorComponent="Alpha" ColorModel="Hsva" - HsvColor="{Binding #ColorSpectrum.HsvColor}" + HsvColor="{TemplateBinding HsvColor, Mode=TwoWay}" IsEnabled="{TemplateBinding IsAlphaEnabled}" IsVisible="{TemplateBinding IsAlphaVisible}" IsRoundingEnabled="True" @@ -619,20 +619,20 @@ - + @@ -617,7 +617,7 @@ AutomationProperties.Name="Alpha Component" ColorComponent="Alpha" ColorModel="Hsva" - HsvColor="{Binding #ColorSpectrum.HsvColor}" + HsvColor="{TemplateBinding HsvColor, Mode=TwoWay}" IsEnabled="{TemplateBinding IsAlphaEnabled}" IsVisible="{TemplateBinding IsAlphaVisible}" IsRoundingEnabled="True" @@ -645,20 +645,20 @@ - +