diff --git a/src/AtomUI.Controls.ColorPicker/ColorPicker.cs b/src/AtomUI.Controls.ColorPicker/ColorPicker.cs
index a4a15fedf..08951d78e 100644
--- a/src/AtomUI.Controls.ColorPicker/ColorPicker.cs
+++ b/src/AtomUI.Controls.ColorPicker/ColorPicker.cs
@@ -1,14 +1,9 @@
using System.Reactive.Disposables;
-using AtomUI.Controls.ColorPickerLang;
using AtomUI.Controls.Themes;
using AtomUI.Data;
-using AtomUI.Theme;
-using AtomUI.Theme.Data;
using Avalonia;
using Avalonia.Controls;
-using Avalonia.Controls.Converters;
using Avalonia.Controls.Primitives;
-using Avalonia.Data;
using Avalonia.Media;
using Avalonia.VisualTree;
@@ -187,6 +182,8 @@ public class ColorPicker : AbstractColorPicker
_presenter = presenter;
_presenter.ValueChanged += HandleColorPickerViewValueChanged;
_presenter.ColorValueCleared += HandleColorCleared;
+ var effectiveColor = Value ?? DefaultValue;
+ _presenter.SetCurrentValue(ColorPickerView.ValueProperty, effectiveColor);
}
}
@@ -201,18 +198,6 @@ public class ColorPicker : AbstractColorPicker
_latestSyncValue = args.NewColor;
}
}
-
- protected override void NotifyFlyoutOpened()
- {
- if (PickerFlyout is ColorPickerFlyout colorPickerFlyout)
- {
- var effectiveColor = Value ?? DefaultValue;
- if (effectiveColor != null)
- {
- colorPickerFlyout.SetCurrentValue(ColorPickerFlyout.ValueProperty, effectiveColor);
- }
- }
- }
protected override void NotifyFlyoutClosed()
{
diff --git a/src/AtomUI.Controls.ColorPicker/Themes/ColorView/AbstractColorPickerViewTheme.axaml b/src/AtomUI.Controls.ColorPicker/Themes/ColorView/AbstractColorPickerViewTheme.axaml
index 6434bfdf3..a173d7bad 100644
--- a/src/AtomUI.Controls.ColorPicker/Themes/ColorView/AbstractColorPickerViewTheme.axaml
+++ b/src/AtomUI.Controls.ColorPicker/Themes/ColorView/AbstractColorPickerViewTheme.axaml
@@ -21,7 +21,9 @@
PaletteGroup="{TemplateBinding PaletteGroup}"
IsVisible="{TemplateBinding IsPaletteGroupEnabled}"
IsMotionEnabled="{TemplateBinding IsMotionEnabled}"/>
-
+