Table of Contents

Class BorderSettings

Namespace
Alternet.UI
Assembly
Alternet.UI.Common.dll

Specifies Border drawing settings.

public class BorderSettings : ImmutableObject, IBaseObjectWithAttr, IBaseObjectWithId, INotifyPropertyChanged, IImmutableObject, IDisposableObject, IDisposable, IBaseObject
Inheritance
BorderSettings
Implements
Extension Methods

Constructors

BorderSettings()

Initializes a new instance of the BorderSettings class.

BorderSettings(BorderSettings)

Initializes a new instance of the BorderSettings class and assign its properties from source.

BorderSettings(Thickness, Color?)

Initializes a new instance of the BorderSettings class with the specified border width and color.

BorderSettings(float, float, float, float, Color?)

Initializes a new instance of the BorderSettings class with the specified border thickness and optional color.

Fields

Default

Default border settings.

DefaultDebugBorderColor

Gets or sets color of the debug border. Default value is Null. In this case red color is used.

DesignCornerSize

Gets or sets size of the design corners.

Temp

Temporary border used for calculations.

Properties

AccentBorder

Gets or sets border settings for the accent border. Accent border is used to indicate active or focused elements. It uses AccentColor as default color. If you want to have the same accent border on all platforms, set AccentColor to the desired color.

Bottom

Gets settings for the bottom edge of the border.

BottomLineBorder

Gets or sets the border settings for the bottom line.

Color

Gets or sets uniform color of the border lines.

DebugBorder

Get border settings for the default debug border.

DebugBorderBlue

Gets or sets border settings for the blue debug border.

DebugBorderGreen

Gets or sets border settings for the green debug border.

DrawDefaultBorder

Gets or sets whether to draw default border.

EmptyColorBorder

Gets a static instance of border settings configured with an empty color value.

HasInnerBorders

Gets whether this border has inner borders. Inner border is drawn inside the main border and can be used to create layered border effects.

InnerBorderMargin

Gets or sets the inner border margin. It determines the spacing between this border and the first inner border.

InnerBorderVisible

Gets or sets whether the inner borders are visible.

InnerBorders

Gets the collection of inner border settings.

IsUniform

Gets whether all sides have same color and width.

IsUniformVerticalColor

Gets whether colors of the left and right edges of the border are equal.

Left

Gets settings for the left edge of the border.

Right

Gets settings for the right edge of the border.

Top

Gets settings for the top edge of the border.

TransparentBorder

Gets a border settings instance configured with a transparent color.

UniformCornerRadius

Gets or sets the uniform corner radius for the Border control.

UniformRadiusIsPercent

Gets or sets whether the uniform corner radius for the Border control is specified in percent.

Width

Gets or sets the border widths.

Methods

Assign(BorderSettings)

Assign properties from another object.

Clone()

Creates clone of the BorderSettings

ColorIsOk(Color?)

Gets whether color is ok for painting the border.

DrawDesignCorners(Graphics, RectD, BorderSettings?)

Draws design corners used to indicate element bounds.

DrawDesignCornersHandler(object?, PaintEventArgs)

Paint event handler implementation which draws design corners used to indicate control's bounds.

GetBottomRectangle(RectD)

Gets rectangle of the bottom border edge.

GetLeftRectangle(RectD)

Gets rectangle of the left border edge.

GetPen()

Gets the first non-null pen from the left, top, right, or bottom sides. This method uses Pen properties of each side.

GetRightRectangle(RectD)

Gets rectangle of the right border edge.

GetTopRectangle(RectD)

Gets rectangle of the top border edge.

GetUniformCornerRadius(RectD)

Gets real uniform corner radius using UniformCornerRadius, UniformRadiusIsPercent and rect.

GetUniformCornerRadius(RectD, float?, bool?)

Calculates a uniform corner radius for a rectangle, optionally treating the radius as a percentage of the rectangle's minimum dimension.

InvokePaint(Graphics, RectD)

Calls paint event with the specified rectangle.

InvokePaint(Graphics, RectD, RectD)

Calls paint event with the specified rectangles.

SetColor(Color?)

Same as using Color property.

SetColors(Color?, Color?, Color?, Color?)

Sets colors of the individual border edges.

SetCornerRadius(BorderCornerRadius?)

Sets the corner radius for the border.

SetInnerBorderVisible(bool)

Sets the visibility of the inner border.

SetUniformCornerRadius(float?)

Sets a uniform corner radius for all corners of the element.

SetWidth(Thickness)

Same as Width but implemented as method.

ToColor(Color)

Gets this border with all valid side colors set to the specified value.

ToGrayScale()

Gets this border with all colors set to GrayText

WithColor(Color)

Creates clone of this object with changed border color.

Events

Paint

Occurs when the border is redrawn.