diff --git a/src/Artemis.UI.Shared/Screens/GradientEditor/GradientEditorViewModel.cs b/src/Artemis.UI.Shared/Screens/GradientEditor/GradientEditorViewModel.cs
index 21f306156..7e4badcbd 100644
--- a/src/Artemis.UI.Shared/Screens/GradientEditor/GradientEditorViewModel.cs
+++ b/src/Artemis.UI.Shared/Screens/GradientEditor/GradientEditorViewModel.cs
@@ -30,18 +30,6 @@ namespace Artemis.UI.Shared.Screens.GradientEditor
ColorStopViewModels.CollectionChanged += ColorStopViewModelsOnCollectionChanged;
}
- #region Overrides of DialogViewModelBase
-
- ///
- public override void OnDialogClosed(object sender, DialogClosingEventArgs e)
- {
- ColorGradient.CollectionChanged -= ColorGradientOnCollectionChanged;
- ColorStopViewModels.CollectionChanged -= ColorStopViewModelsOnCollectionChanged;
- base.OnDialogClosed(sender, e);
- }
-
- #endregion
-
public BindableCollection ColorStopViewModels { get; }
public ColorStopViewModel? SelectedColorStopViewModel
@@ -65,11 +53,20 @@ namespace Artemis.UI.Shared.Screens.GradientEditor
set => SetAndNotify(ref _previewWidth, value);
}
- public ColorGradient Stops
+ public ColorGradient Stops => ColorGradient;
+
+ #region Overrides of DialogViewModelBase
+
+ ///
+ public override void OnDialogClosed(object sender, DialogClosingEventArgs e)
{
- get => ColorGradient;
+ ColorGradient.CollectionChanged -= ColorGradientOnCollectionChanged;
+ ColorStopViewModels.CollectionChanged -= ColorStopViewModelsOnCollectionChanged;
+ base.OnDialogClosed(sender, e);
}
+ #endregion
+
public void AddColorStop(object sender, MouseEventArgs e)
{
Canvas? child = VisualTreeUtilities.FindChild