@ -148,6 +148,14 @@ namespace Avalonia.Controls
nameof ( IsHexInputVisible ) ,
nameof ( IsHexInputVisible ) ,
true ) ;
true ) ;
/// <summary>
/// Defines the <see cref="IsHostedInColorPicker"/> property.
/// </summary>
public static readonly StyledProperty < bool > IsHostedInColorPickerProperty =
AvaloniaProperty . Register < ColorView , bool > (
nameof ( IsHostedInColorPicker ) ,
false ) ;
/// <summary>
/// <summary>
/// Defines the <see cref="MaxHue"/> property.
/// Defines the <see cref="MaxHue"/> property.
/// </summary>
/// </summary>
@ -395,6 +403,22 @@ namespace Avalonia.Controls
set = > SetValue ( IsHexInputVisibleProperty , value ) ;
set = > SetValue ( IsHexInputVisibleProperty , value ) ;
}
}
/// <summary>
/// Gets or sets a value indicating whether this <see cref="ColorView"/> is hosted
/// inside a <see cref="ColorPicker"/>'s control template.
/// </summary>
/// <remarks>
/// This is a special property to change how the <see cref="ColorView"/> internally
/// processes property updates. When a <see cref="ColorView"/> is hosted within a
/// <see cref="ColorPicker"/>, it does not need to handle most property changes.
/// Instead, the primary calculations are done within the <see cref="ColorPicker"/> itself.
/// </remarks>
public bool IsHostedInColorPicker
{
get = > GetValue ( IsHostedInColorPickerProperty ) ;
set = > SetValue ( IsHostedInColorPickerProperty , value ) ;
}
/// <inheritdoc cref="ColorSpectrum.MaxHue"/>
/// <inheritdoc cref="ColorSpectrum.MaxHue"/>
public int MaxHue
public int MaxHue
{
{