Border

Note: You can check the Avalonia docs for the Border and Border Api if you need more information.

For Avalonia.FuncUI's DSL properties you can check Border.fs

The Border control allows you to decorate child controls

Usage

Set Background Avalonia.FuncUI has some overloads for you to take advantage of

Border.create [
  Border.background "black"
  Border.child (StackPanel.create [ /* ... definition ... */ ])
]
Border.create [
  Border.background "#000000"
  Border.child (StackPanel.create [ /* ... definition ... */ ])
]

You can pass any IBrush compatible instance to the background for more control

Set Border Brush Avalonia.FuncUI has some overloads for you to take advantage of

Border.create [
  Border.borderBrush "red"
  Border.child (StackPanel.create [ /* ... definition ... */ ])
]

You can pass any IBrush compatible instance to the background for more control

Thickness

Horizontal and Vertical Thickness

Left, Top, Right, Bottom Thickness

You can also pass a Thickness struct to the borderThickness property

Corner Radius

Horizontal and Vertical Corner Radius

Left, Top, Right, Bottom Corner Radius

You can also pass a Corner Radius struct to the cornerRadius property

Last updated