diff --git a/RGB.NET.Brushes/Brushes/ConicalGradientBrush.cs b/RGB.NET.Brushes/Brushes/ConicalGradientBrush.cs
index 9a87bd8..9c25109 100644
--- a/RGB.NET.Brushes/Brushes/ConicalGradientBrush.cs
+++ b/RGB.NET.Brushes/Brushes/ConicalGradientBrush.cs
@@ -19,21 +19,36 @@ namespace RGB.NET.Brushes
{
#region Properties & Fields
+ private float _origin = (float)Math.Atan2(-1, 0);
///
/// Gets or sets the origin (radian-angle) this is drawn to. (default: -π/2)
///
- public float Origin { get; set; } = (float)Math.Atan2(-1, 0);
+ public float Origin
+ {
+ get => _origin;
+ set => SetProperty(ref _origin, value);
+ }
+ private Point _center = new Point(0.5, 0.5);
///
/// Gets or sets the center (as percentage in the range [0..1]) of the drawn by this . (default: 0.5, 0.5)
///
- public Point Center { get; set; } = new Point(0.5, 0.5);
+ public Point Center
+ {
+ get => _center;
+ set => SetProperty(ref _center, value);
+ }
+ private IGradient _gradient;
///
///
/// Gets or sets the gradient drawn by the brush. If null it will default to full transparent.
///
- public IGradient Gradient { get; set; }
+ public IGradient Gradient
+ {
+ get => _gradient;
+ set => SetProperty(ref _gradient, value);
+ }
#endregion
diff --git a/RGB.NET.Brushes/Brushes/LinearGradientBrush.cs b/RGB.NET.Brushes/Brushes/LinearGradientBrush.cs
index ad93254..0880e4c 100644
--- a/RGB.NET.Brushes/Brushes/LinearGradientBrush.cs
+++ b/RGB.NET.Brushes/Brushes/LinearGradientBrush.cs
@@ -20,18 +20,33 @@ namespace RGB.NET.Brushes
{
#region Properties & Fields
+ private Point _startPoint = new Point(0, 0.5);
///
/// Gets or sets the start (as percentage in the range [0..1]) of the drawn by this . (default: 0.0, 0.5)
///
- public Point StartPoint { get; set; } = new Point(0, 0.5);
+ public Point StartPoint
+ {
+ get => _startPoint;
+ set => SetProperty(ref _startPoint, value);
+ }
+ private Point _endPoint = new Point(1, 0.5);
///
/// Gets or sets the end (as percentage in the range [0..1]) of the drawn by this . (default: 1.0, 0.5)
///
- public Point EndPoint { get; set; } = new Point(1, 0.5);
+ public Point EndPoint
+ {
+ get => _endPoint;
+ set => SetProperty(ref _endPoint, value);
+ }
+ private IGradient _gradient;
///
- public IGradient Gradient { get; set; }
+ public IGradient Gradient
+ {
+ get => _gradient;
+ set => SetProperty(ref _gradient, value);
+ }
#endregion
diff --git a/RGB.NET.Brushes/Brushes/RadialGradientBrush.cs b/RGB.NET.Brushes/Brushes/RadialGradientBrush.cs
index ee152c4..58df28e 100644
--- a/RGB.NET.Brushes/Brushes/RadialGradientBrush.cs
+++ b/RGB.NET.Brushes/Brushes/RadialGradientBrush.cs
@@ -18,13 +18,23 @@ namespace RGB.NET.Brushes
{
#region Properties & Fields
+ private Point _center = new Point(0.5, 0.5);
///
/// Gets or sets the center (as percentage in the range [0..1]) around which the should be drawn. (default: 0.5, 0.5)
///
- public Point Center { get; set; } = new Point(0.5, 0.5);
+ public Point Center
+ {
+ get => _center;
+ set => SetProperty(ref _center, value);
+ }
+ private IGradient _gradient;
///
- public IGradient Gradient { get; set; }
+ public IGradient Gradient
+ {
+ get => _gradient;
+ set => SetProperty(ref _gradient, value);
+ }
#endregion
diff --git a/RGB.NET.Brushes/Brushes/SolidColorBrush.cs b/RGB.NET.Brushes/Brushes/SolidColorBrush.cs
index 8e4a1a1..3620ea5 100644
--- a/RGB.NET.Brushes/Brushes/SolidColorBrush.cs
+++ b/RGB.NET.Brushes/Brushes/SolidColorBrush.cs
@@ -13,10 +13,15 @@ namespace RGB.NET.Brushes
{
#region Properties & Fields
+ private Color _color;
///
/// Gets or sets the drawn by this .
///
- public Color Color { get; set; }
+ public Color Color
+ {
+ get => _color;
+ set => SetProperty(ref _color, value);
+ }
#endregion
diff --git a/RGB.NET.Brushes/Gradients/AbstractGradient.cs b/RGB.NET.Brushes/Gradients/AbstractGradient.cs
index 507bd63..4cc0744 100644
--- a/RGB.NET.Brushes/Gradients/AbstractGradient.cs
+++ b/RGB.NET.Brushes/Gradients/AbstractGradient.cs
@@ -2,7 +2,7 @@
// ReSharper disable MemberCanBePrivate.Global
// ReSharper disable AutoPropertyCanBeMadeGetOnly.Global
-using System.Collections.Generic;
+using System.Collections.ObjectModel;
using System.Linq;
using RGB.NET.Core;
@@ -20,14 +20,19 @@ namespace RGB.NET.Brushes.Gradients
///
/// Gets a list of the stops used by this .
///
- public IList GradientStops { get; } = new List();
+ public ObservableCollection GradientStops { get; } = new ObservableCollection();
+ private bool _wrapGradient;
///
/// Gets or sets if the Gradient wraps around if there isn't a second stop to take.
/// Example: There is a stop at offset 0.0, 0.5 and 0.75.
/// Without wrapping offset 1.0 will be calculated the same as 0.75; with wrapping it would be the same as 0.0.
///
- public bool WrapGradient { get; set; }
+ public bool WrapGradient
+ {
+ get => _wrapGradient;
+ set => SetProperty(ref _wrapGradient, value);
+ }
#endregion
diff --git a/RGB.NET.Brushes/Gradients/GradientStop.cs b/RGB.NET.Brushes/Gradients/GradientStop.cs
index e27776a..3cb4597 100644
--- a/RGB.NET.Brushes/Gradients/GradientStop.cs
+++ b/RGB.NET.Brushes/Gradients/GradientStop.cs
@@ -8,19 +8,29 @@ namespace RGB.NET.Brushes.Gradients
///
/// Represents a stop on a gradient.
///
- public class GradientStop
+ public class GradientStop : AbstractBindable
{
#region Properties & Fields
+ private double _offset;
///
/// Gets or sets the percentage offset to place this . This should be inside the range of [0..1] but it's not necessary.
///
- public double Offset { get; set; }
+ public double Offset
+ {
+ get => _offset;
+ set => SetProperty(ref _offset, value);
+ }
+ private Color _color;
///
/// Gets or sets the of this .
///
- public Color Color { get; set; }
+ public Color Color
+ {
+ get => _color;
+ set => SetProperty(ref _color, value);
+ }
#endregion
diff --git a/RGB.NET.Brushes/Gradients/RainbowGradient.cs b/RGB.NET.Brushes/Gradients/RainbowGradient.cs
index e565b24..8ecb057 100644
--- a/RGB.NET.Brushes/Gradients/RainbowGradient.cs
+++ b/RGB.NET.Brushes/Gradients/RainbowGradient.cs
@@ -15,15 +15,25 @@ namespace RGB.NET.Brushes.Gradients
{
#region Properties & Fields
+ private double _startHue;
///
/// Gets or sets the hue (in degrees) to start from.
///
- public double StartHue { get; set; }
+ public double StartHue
+ {
+ get => _startHue;
+ set => SetProperty(ref _startHue, value);
+ }
+ private double _endHue;
///
/// Gets or sets the hue (in degrees) to end the with.
///
- public double EndHue { get; set; }
+ public double EndHue
+ {
+ get => _endHue;
+ set => SetProperty(ref _endHue, value);
+ }
#endregion