Class Border
A control which decorates a child with a border and background.
public class Border : Decorator, INotifyPropertyChanged, IDataContextProvider, ILogical, IThemeVariantHost, IResourceHost, IResourceNode, IStyleHost, ISetLogicalParent, ISetInheritanceParent, ISupportInitialize, IStyleable, INamed, IInputElement, IDataTemplateHost, ISetterValue
- Inheritance
-
Border
- Implements
- Derived
- Inherited Members
- Extension Methods
Constructors
Border()
public Border()
Fields
BackgroundProperty
Defines the Background property.
public static readonly StyledProperty<IBrush?> BackgroundProperty
Field Value
BackgroundSizingProperty
Defines the BackgroundSizing property.
public static readonly StyledProperty<BackgroundSizing> BackgroundSizingProperty
Field Value
BorderBrushProperty
Defines the BorderBrush property.
public static readonly StyledProperty<IBrush?> BorderBrushProperty
Field Value
BorderThicknessProperty
Defines the BorderThickness property.
public static readonly StyledProperty<Thickness> BorderThicknessProperty
Field Value
BoxShadowProperty
Defines the BoxShadow property.
public static readonly StyledProperty<BoxShadows> BoxShadowProperty
Field Value
CornerRadiusProperty
Defines the CornerRadius property.
public static readonly StyledProperty<CornerRadius> CornerRadiusProperty
Field Value
Properties
Background
Gets or sets a brush with which to paint the background.
public IBrush? Background { get; set; }
Property Value
BackgroundSizing
Gets or sets how the background is drawn relative to the border.
public BackgroundSizing BackgroundSizing { get; set; }
Property Value
BorderBrush
Gets or sets a brush with which to paint the border.
public IBrush? BorderBrush { get; set; }
Property Value
BorderThickness
Gets or sets the thickness of the border.
public Thickness BorderThickness { get; set; }
Property Value
BoxShadow
Gets or sets the box shadow effect parameters
public BoxShadows BoxShadow { get; set; }
Property Value
ClipToBoundsRadius
Gets a value indicating the corner radius of control's clip bounds
public CornerRadius ClipToBoundsRadius { get; }
Property Value
CornerRadius
Gets or sets the radius of the border rounded corners.
public CornerRadius CornerRadius { get; set; }
Property Value
Methods
ArrangeOverride(Size)
Arranges the control's child.
protected override Size ArrangeOverride(Size finalSize)
Parameters
finalSize
SizeThe size allocated to the control.
Returns
- Size
The space taken.
MeasureOverride(Size)
Measures the control.
protected override Size MeasureOverride(Size availableSize)
Parameters
availableSize
SizeThe available size.
Returns
- Size
The desired size of the control.
OnPropertyChanged(AvaloniaPropertyChangedEventArgs)
Called when a avalonia property changes on the object.
protected override void OnPropertyChanged(AvaloniaPropertyChangedEventArgs change)
Parameters
change
AvaloniaPropertyChangedEventArgsThe property change details.
Render(DrawingContext)
Renders the control.
public override sealed void Render(DrawingContext context)
Parameters
context
DrawingContextThe drawing context.