Border Class
NuGet: GHIElectronics.TinyCLR.UI
Assembly: GHIElectronics.TinyCLR.UI
Namespace: GHIElectronics.TinyCLR.UI.Controls
Draws a border around its single child element.
public class Border : ContentControl
Constructors
Border()
public Border()
Creates a new Border with a black, one-pixel border.
Properties
BorderBrush
public Media.Brush BorderBrush { get; set; }
The brush used to paint the border.
CornerRadius
public int CornerRadius { get; set; }
Corner radius in pixels (0 = square corners, the default). Rounds both the border and the background fill — cheap (only the corner pixels rasterize).
Methods
GetBorderThickness(out int left, out int top, out int right, out int bottom)
public void GetBorderThickness(out int left, out int top, out int right, out int bottom)
Gets the border thickness on each side, in pixels.
SetBorderThickness(int length)
public void SetBorderThickness(int length)
Sets a uniform border thickness on all sides.
SetBorderThickness(int left, int top, int right, int bottom)
public void SetBorderThickness(int left, int top, int right, int bottom)
Sets the border thickness for each side individually.
ArrangeOverride(int arrangeWidth, int arrangeHeight)
protected override void ArrangeOverride(int arrangeWidth, int arrangeHeight)
Arranges the child inside the border.
MeasureOverride(int availableWidth, int availableHeight, out int desiredWidth, out int desiredHeight)
protected override void MeasureOverride(int availableWidth, int availableHeight, out int desiredWidth, out int desiredHeight)
Measures the child plus the border thickness.
OnRender(DrawingContext dc)
public override void OnRender(DrawingContext dc)
Draws the border and background.