namespace Avalonia.Media
{
///
/// Describes the location and color of a transition point in a gradient.
///
public sealed class GradientStop : AvaloniaObject, IGradientStop
{
///
/// Describes the property.
///
public static readonly StyledProperty OffsetProperty =
AvaloniaProperty.Register(nameof(Offset));
///
/// Describes the property.
///
public static readonly StyledProperty ColorProperty =
AvaloniaProperty.Register(nameof(Color));
///
/// Initializes a new instance of the class.
///
public GradientStop() { }
///
/// Initializes a new instance of the class.
///
/// The color
/// The offset
public GradientStop(Color color, double offset)
{
Color = color;
Offset = offset;
}
///
public double Offset
{
get => GetValue(OffsetProperty);
set => SetValue(OffsetProperty, value);
}
///
public Color Color
{
get => GetValue(ColorProperty);
set => SetValue(ColorProperty, value);
}
}
}