LinearGradientBrush

Inheritance: GradientBrush AvaloniaUI documentation: LinearGradientBrush API

Constructors

ConstructorsDescription

LinearGradientBrush(startPoint: RelativePoint, endPoint: RelativePoint)

Creates a LinearGradientBrush widget.

LinearGradientBrush'(startPoint: RelativePoint, endPoint: RelativePoint)

Creates a LinearGradientBrush widget.

LinearGradientBrush(startPoint: Point, endPoint: Point, unit: RelativeUnit)

Creates a LinearGradientBrush widget.

LinearGradientBrush(startPoint: Point, endPoint: Point)

Creates a LinearGradientBrush widget.

LinearGradientBrush(startPoint: Point, endPoint: Point, startUnit: RelativeUnit, endUnit: RelativeUnit)

Creates a LinearGradientBrush widget.

LinearGradientBrush()

Creates a LinearGradientBrush widget.

LinearGradientBrush'()

Creates a LinearGradientBrush widget.

Properties

PropertiesDescription

reference(value: ViewRef)

Link a ViewRef to access the direct LinearGradientBrush control instance.

Usages

LinearGradientBrush() {
    GradientStop(Colors.Blue, 0.)
    GradientStop(Colors.Black, 1.)
}

Get access to the underlying LinearGradientBrush

let brushesRef = ViewRef<LinearGradientBrush>()

(LinearGradientBrush() {
    GradientStop(Colors.Blue, 0.)
    GradientStop(Colors.Black, 1.)
})
    .reference(brushesRef)

Last updated