diff --git a/samples/ControlCatalog/Pages/ColorPickerPage.xaml b/samples/ControlCatalog/Pages/ColorPickerPage.xaml
index 486a36956f..1590be25ba 100644
--- a/samples/ControlCatalog/Pages/ColorPickerPage.xaml
+++ b/samples/ControlCatalog/Pages/ColorPickerPage.xaml
@@ -47,7 +47,7 @@
ColorModel="Hsva"
HsvColor="{Binding HsvColor, ElementName=ColorSpectrum1}" />
- /// Defines the property.
+ /// Defines the property.
///
- public static readonly StyledProperty ShowAccentColorsProperty =
+ public static readonly StyledProperty IsAccentColorsVisibleProperty =
AvaloniaProperty.Register(
- nameof(ShowAccentColors),
+ nameof(IsAccentColorsVisible),
true);
///
@@ -38,13 +38,13 @@ namespace Avalonia.Controls.Primitives
}
///
- /// Gets or sets a value indicating whether accent colors are shown along
+ /// Gets or sets a value indicating whether accent colors are visible along
/// with the preview color.
///
- public bool ShowAccentColors
+ public bool IsAccentColorsVisible
{
- get => GetValue(ShowAccentColorsProperty);
- set => SetValue(ShowAccentColorsProperty, value);
+ get => GetValue(IsAccentColorsVisibleProperty);
+ set => SetValue(IsAccentColorsVisibleProperty, value);
}
}
}
diff --git a/src/Avalonia.Controls.ColorPicker/ColorView/ColorView.Properties.cs b/src/Avalonia.Controls.ColorPicker/ColorView/ColorView.Properties.cs
index d59c4d544a..b76059037b 100644
--- a/src/Avalonia.Controls.ColorPicker/ColorView/ColorView.Properties.cs
+++ b/src/Avalonia.Controls.ColorPicker/ColorView/ColorView.Properties.cs
@@ -52,6 +52,14 @@ namespace Avalonia.Controls
defaultBindingMode: BindingMode.TwoWay,
coerce: CoerceHsvColor);
+ ///
+ /// Defines the property.
+ ///
+ public static readonly StyledProperty IsAccentColorsVisibleProperty =
+ AvaloniaProperty.Register(
+ nameof(IsAccentColorsVisible),
+ true);
+
///
/// Defines the property.
///
@@ -220,14 +228,6 @@ namespace Avalonia.Controls
nameof(SelectedIndex),
(int)ColorViewTab.Spectrum);
- ///
- /// Defines the property.
- ///
- public static readonly StyledProperty ShowAccentColorsProperty =
- AvaloniaProperty.Register(
- nameof(ShowAccentColors),
- true);
-
///
public Color Color
{
@@ -267,6 +267,13 @@ namespace Avalonia.Controls
set => SetValue(HsvColorProperty, value);
}
+ ///
+ public bool IsAccentColorsVisible
+ {
+ get => GetValue(IsAccentColorsVisibleProperty);
+ set => SetValue(IsAccentColorsVisibleProperty, value);
+ }
+
///
/// Gets or sets a value indicating whether the alpha component is enabled.
/// When disabled (set to false) the alpha component will be fixed to maximum and
@@ -325,7 +332,7 @@ namespace Avalonia.Controls
///
///
/// Note that accent color visibility is controlled separately by
- /// .
+ /// .
///
public bool IsColorPreviewVisible
{
@@ -484,12 +491,5 @@ namespace Avalonia.Controls
get => GetValue(SelectedIndexProperty);
set => SetValue(SelectedIndexProperty, value);
}
-
- ///
- public bool ShowAccentColors
- {
- get => GetValue(ShowAccentColorsProperty);
- set => SetValue(ShowAccentColorsProperty, value);
- }
}
}
diff --git a/src/Avalonia.Controls.ColorPicker/Themes/Default/ColorPreviewer.xaml b/src/Avalonia.Controls.ColorPicker/Themes/Default/ColorPreviewer.xaml
index 3a4efaa42a..c3bc7df4a4 100644
--- a/src/Avalonia.Controls.ColorPicker/Themes/Default/ColorPreviewer.xaml
+++ b/src/Avalonia.Controls.ColorPicker/Themes/Default/ColorPreviewer.xaml
@@ -14,69 +14,87 @@
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+ BoxShadow="0 0 10 2 #BF000000"
+ CornerRadius="{TemplateBinding CornerRadius}"
+ Margin="10">
+
+
+
+
+
-
-
+
+
-
-
+
diff --git a/src/Avalonia.Controls.ColorPicker/Themes/Fluent/ColorPicker.xaml b/src/Avalonia.Controls.ColorPicker/Themes/Fluent/ColorPicker.xaml
index b34ac68be5..a4d5ff673f 100644
--- a/src/Avalonia.Controls.ColorPicker/Themes/Fluent/ColorPicker.xaml
+++ b/src/Avalonia.Controls.ColorPicker/Themes/Fluent/ColorPicker.xaml
@@ -53,6 +53,7 @@
ColorSpectrumComponents="{TemplateBinding ColorSpectrumComponents}"
ColorSpectrumShape="{TemplateBinding ColorSpectrumShape}"
HsvColor="{Binding HsvColor, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay}"
+ IsAccentColorsVisible="{TemplateBinding IsAccentColorsVisible}"
IsAlphaEnabled="{TemplateBinding IsAlphaEnabled}"
IsAlphaVisible="{TemplateBinding IsAlphaVisible}"
IsColorComponentsVisible="{TemplateBinding IsColorComponentsVisible}"
@@ -73,8 +74,7 @@
PaletteColors="{TemplateBinding PaletteColors}"
PaletteColumnCount="{TemplateBinding PaletteColumnCount}"
Palette="{TemplateBinding Palette}"
- SelectedIndex="{Binding SelectedIndex, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay}"
- ShowAccentColors="{TemplateBinding ShowAccentColors}" />
+ SelectedIndex="{Binding SelectedIndex, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay}" />
diff --git a/src/Avalonia.Controls.ColorPicker/Themes/Fluent/ColorPreviewer.xaml b/src/Avalonia.Controls.ColorPicker/Themes/Fluent/ColorPreviewer.xaml
index 77059f14fb..74f33d1258 100644
--- a/src/Avalonia.Controls.ColorPicker/Themes/Fluent/ColorPreviewer.xaml
+++ b/src/Avalonia.Controls.ColorPicker/Themes/Fluent/ColorPreviewer.xaml
@@ -14,69 +14,87 @@
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+ BoxShadow="0 0 10 2 #BF000000"
+ CornerRadius="{TemplateBinding CornerRadius}"
+ Margin="10">
+
+
+
+
+
-
-
+
+
-
-
+
diff --git a/src/Avalonia.Controls.ColorPicker/Themes/Fluent/ColorView.xaml b/src/Avalonia.Controls.ColorPicker/Themes/Fluent/ColorView.xaml
index bcdb72d96c..e25e822f3f 100644
--- a/src/Avalonia.Controls.ColorPicker/Themes/Fluent/ColorView.xaml
+++ b/src/Avalonia.Controls.ColorPicker/Themes/Fluent/ColorView.xaml
@@ -638,8 +638,8 @@