|
@@ -93,6 +93,14 @@ namespace Avalonia.Controls.Primitives
|
|
|
nameof(Shape),
|
|
nameof(Shape),
|
|
|
ColorSpectrumShape.Box);
|
|
ColorSpectrumShape.Box);
|
|
|
|
|
|
|
|
|
|
+ /// <summary>
|
|
|
|
|
+ /// Defines the <see cref="ThirdComponent"/> property.
|
|
|
|
|
+ /// </summary>
|
|
|
|
|
+ public static readonly StyledProperty<ColorComponent> ThirdComponentProperty =
|
|
|
|
|
+ AvaloniaProperty.Register<ColorSpectrum, ColorComponent>(
|
|
|
|
|
+ nameof(ThirdComponent),
|
|
|
|
|
+ ColorComponent.Component3); // Value
|
|
|
|
|
+
|
|
|
/// <summary>
|
|
/// <summary>
|
|
|
/// Gets or sets the currently selected color in the RGB color model.
|
|
/// Gets or sets the currently selected color in the RGB color model.
|
|
|
/// </summary>
|
|
/// </summary>
|
|
@@ -218,5 +226,21 @@ namespace Avalonia.Controls.Primitives
|
|
|
get => GetValue(ShapeProperty);
|
|
get => GetValue(ShapeProperty);
|
|
|
set => SetValue(ShapeProperty, value);
|
|
set => SetValue(ShapeProperty, value);
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ /// <summary>
|
|
|
|
|
+ /// Gets the third HSV color component that is NOT displayed by the spectrum.
|
|
|
|
|
+ /// This is automatically calculated from the <see cref="Components"/> property.
|
|
|
|
|
+ /// </summary>
|
|
|
|
|
+ /// <remarks>
|
|
|
|
|
+ /// This property should be used for any external color slider that represents the
|
|
|
|
|
+ /// third component of the color. Note that this property uses the generic
|
|
|
|
|
+ /// <see cref="ColorComponent"/> type instead of the more accurate <see cref="HsvComponent"/>
|
|
|
|
|
+ /// to allow direct usage by the generalized color sliders.
|
|
|
|
|
+ /// </remarks>
|
|
|
|
|
+ public ColorComponent ThirdComponent
|
|
|
|
|
+ {
|
|
|
|
|
+ get => GetValue(ThirdComponentProperty);
|
|
|
|
|
+ private set => SetValue(ThirdComponentProperty, value);
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|