diff --git a/src/Avalonia.Controls.ColorPicker/ColorPicker/ColorPicker.cs b/src/Avalonia.Controls.ColorPicker/ColorPicker/ColorPicker.cs
index 92d8535272..39369bcbdb 100644
--- a/src/Avalonia.Controls.ColorPicker/ColorPicker/ColorPicker.cs
+++ b/src/Avalonia.Controls.ColorPicker/ColorPicker/ColorPicker.cs
@@ -11,6 +11,9 @@
///
public ColorPicker() : base()
{
+ // Completely ignore property changes here
+ // The ColorView in the control template is responsible to manage this
+ base.ignorePropertyChanged = true;
}
}
}
diff --git a/src/Avalonia.Controls.ColorPicker/ColorView/ColorView.Properties.cs b/src/Avalonia.Controls.ColorPicker/ColorView/ColorView.Properties.cs
index d1ee375e28..b76059037b 100644
--- a/src/Avalonia.Controls.ColorPicker/ColorView/ColorView.Properties.cs
+++ b/src/Avalonia.Controls.ColorPicker/ColorView/ColorView.Properties.cs
@@ -148,14 +148,6 @@ namespace Avalonia.Controls
nameof(IsHexInputVisible),
true);
- ///
- /// Defines the property.
- ///
- public static readonly StyledProperty IsHostedInColorPickerProperty =
- AvaloniaProperty.Register(
- nameof(IsHostedInColorPicker),
- false);
-
///
/// Defines the property.
///
@@ -403,22 +395,6 @@ namespace Avalonia.Controls
set => SetValue(IsHexInputVisibleProperty, value);
}
- ///
- /// Gets or sets a value indicating whether this is hosted
- /// inside a 's control template.
- ///
- ///
- /// This is a special property to change how the internally
- /// processes property updates. When a is hosted within a
- /// , it does not need to handle most property changes.
- /// Instead, the primary calculations are done within the itself.
- ///
- public bool IsHostedInColorPicker
- {
- get => GetValue(IsHostedInColorPickerProperty);
- set => SetValue(IsHostedInColorPickerProperty, value);
- }
-
///
public int MaxHue
{
diff --git a/src/Avalonia.Controls.ColorPicker/ColorView/ColorView.cs b/src/Avalonia.Controls.ColorPicker/ColorView/ColorView.cs
index b0d5250c50..89f1afb1ac 100644
--- a/src/Avalonia.Controls.ColorPicker/ColorView/ColorView.cs
+++ b/src/Avalonia.Controls.ColorPicker/ColorView/ColorView.cs
@@ -206,26 +206,6 @@ namespace Avalonia.Controls
return;
}
- // Special handling for when hosted within a ColorPicker and the ColorPicker is
- // responsible for most of the internal processing and property updates.
- if (IsHostedInColorPicker)
- {
- if (change.Property == ColorProperty ||
- change.Property == HsvColorProperty)
- {
- ignorePropertyChanged = true;
-
- // The Hex text isn't currently bound with the ColorPicker and therefore
- // must still be updated here.
- SetColorToHexTextBox();
-
- ignorePropertyChanged = false;
- }
-
- base.OnPropertyChanged(change);
- return;
- }
-
// Always keep the two color properties in sync
if (change.Property == ColorProperty)
{
diff --git a/src/Avalonia.Controls.ColorPicker/Themes/Fluent/ColorPicker.xaml b/src/Avalonia.Controls.ColorPicker/Themes/Fluent/ColorPicker.xaml
index acdd06480f..74a1df4991 100644
--- a/src/Avalonia.Controls.ColorPicker/Themes/Fluent/ColorPicker.xaml
+++ b/src/Avalonia.Controls.ColorPicker/Themes/Fluent/ColorPicker.xaml
@@ -43,11 +43,7 @@
-