Show / Hide Table of Contents

Struct Border.BorderParameters

The settings to use when creating a Border.

Inherited Members
ValueType.Equals(object)
ValueType.GetHashCode()
ValueType.ToString()
object.GetType()
object.Equals(object, object)
object.ReferenceEquals(object, object)
Namespace: SadConsole.UI
Assembly: SadConsole.Extended.dll
Syntax
public struct Border.BorderParameters

Constructors

BorderParameters(bool, ShapeParameters?, string?, HorizontalAlignment, Color, Color, bool, bool, bool, int, Color, Color)

Creates a new instance of this class which contains the settings for drawing a border surface around an existing surface.

Declaration
public BorderParameters(bool drawBorder, ShapeParameters? borderBox, string? title, HorizontalAlignment titleAlignment, Color titleForeground, Color titleBackground, bool drawShadedArea, bool useDefaultShadedGlyphs, bool useDefaultShadedColors, int shadedGlyph, Color shadedGlyphForeground, Color shadedGlyphBackground)
Parameters
Type Name Description
bool drawBorder

When true, indicates the borderBox should be used to draw a border.

ShapeParameters borderBox

The box drawn around the surface.

string title

The title to display on the border.

HorizontalAlignment titleAlignment

The alignment of the title.

Color titleForeground

The foreground color of the title.

Color titleBackground

The background color of the title.

bool drawShadedArea

When true, indicates the 3d shaded area of the border should be drawn.

bool useDefaultShadedGlyphs

When true, indicates the other shaded properties should be ignored and the default shaded glyphs should be used.

bool useDefaultShadedColors

When true, indicates the other shaded properties should be ignored and the default shaded glyphs should be used.

int shadedGlyph

The glyph to use in the shaded area.

Color shadedGlyphForeground

The forground of the shadedGlyph.

Color shadedGlyphBackground

The background of the shadedGlyph.

Properties

BorderBox

The border box creation parameters.

Declaration
public ShapeParameters? BorderBox { readonly get; set; }
Property Value
Type Description
ShapeParameters

DrawBorder

When true, indicates the BorderBox should be used to draw a border.

Declaration
public bool DrawBorder { readonly get; set; }
Property Value
Type Description
bool

DrawShadedArea

When true, indicates the 3d shaded area of the border should be drawn.

Declaration
public bool DrawShadedArea { readonly get; set; }
Property Value
Type Description
bool

ShadedGlyph

The glyph to use in the shaded area.

Declaration
public int ShadedGlyph { readonly get; set; }
Property Value
Type Description
int

ShadedGlyphBackground

The background of the ShadedGlyph.

Declaration
public Color ShadedGlyphBackground { readonly get; set; }
Property Value
Type Description
Color

ShadedGlyphForeground

The forground of the ShadedGlyph.

Declaration
public Color ShadedGlyphForeground { readonly get; set; }
Property Value
Type Description
Color

Title

The title to display on the border.

Declaration
public string? Title { readonly get; set; }
Property Value
Type Description
string

TitleAlignment

The alignment of the Title.

Declaration
public HorizontalAlignment TitleAlignment { readonly get; set; }
Property Value
Type Description
HorizontalAlignment

TitleBackground

The background color of the title.

Declaration
public Color TitleBackground { readonly get; set; }
Property Value
Type Description
Color

TitleForeground

The foreground color of the title.

Declaration
public Color TitleForeground { readonly get; set; }
Property Value
Type Description
Color

UseDefaultShadedColors

When true, indicates the other shaded properties should be ignored and the default shaded glyphs should be used.

Declaration
public bool UseDefaultShadedColors { readonly get; set; }
Property Value
Type Description
bool

UseDefaultShadedGlyphs

When true, indicates the other shaded properties should be ignored and the default shaded glyphs should be used.

Declaration
public bool UseDefaultShadedGlyphs { readonly get; set; }
Property Value
Type Description
bool

Methods

AddShadow()

Sets the DrawShadedArea to true.

Declaration
public Border.BorderParameters AddShadow()
Returns
Type Description
Border.BorderParameters

The modified instance of Border.BorderParameters.

AddShadow(Color, Color)

Sets the DrawShadedArea to true and modifies default shadow colors.

Declaration
public Border.BorderParameters AddShadow(Color foregroundColor, Color backgroundColor)
Parameters
Type Name Description
Color foregroundColor

ShadedGlyph new foreground Color.

Color backgroundColor

ShadedGlyph new background Color.

Returns
Type Description
Border.BorderParameters

The modified instance of Border.BorderParameters.

AddShadow(int)

Sets the DrawShadedArea to true and modifies shadow glyph.

Declaration
public Border.BorderParameters AddShadow(int shadedGlyph)
Parameters
Type Name Description
int shadedGlyph

Glyph number to use as a shadow.

Returns
Type Description
Border.BorderParameters

The modified instance of Border.BorderParameters.

AddShadow(int, Color, Color)

Sets the DrawShadedArea to true and modifies default shadow glyph and colors.

Declaration
public Border.BorderParameters AddShadow(int shadedGlyph, Color foregroundColor, Color backgroundColor)
Parameters
Type Name Description
int shadedGlyph

Glyph number to use as a shadow.

Color foregroundColor

ShadedGlyph new foreground Color.

Color backgroundColor

ShadedGlyph new background Color.

Returns
Type Description
Border.BorderParameters

The modified instance of Border.BorderParameters.

AddTitle(string)

Sets the Title parameter with the given text.

Declaration
public Border.BorderParameters AddTitle(string title)
Parameters
Type Name Description
string title

Title text.

Returns
Type Description
Border.BorderParameters

The modified instance of Border.BorderParameters.

AddTitle(string, Color, Color, HorizontalAlignment)

Sets the Title parameter with the given text and changes title colors.

Declaration
public Border.BorderParameters AddTitle(string title, Color foregroundColor, Color backgroundColor, HorizontalAlignment horizontalAlignment = HorizontalAlignment.Center)
Parameters
Type Name Description
string title

Title text.

Color foregroundColor

Title foreground Color.

Color backgroundColor

Title background Color.

HorizontalAlignment horizontalAlignment

Title text HorizontalAlignment.

Returns
Type Description
Border.BorderParameters

The modified instance of Border.BorderParameters.

ChangeBorderBackgroundColor(Color)

Changes border background color.

Declaration
public Border.BorderParameters ChangeBorderBackgroundColor(Color backgroundColor)
Parameters
Type Name Description
Color backgroundColor

Border line background Color.

Returns
Type Description
Border.BorderParameters

The modified instance of Border.BorderParameters.

ChangeBorderColors(Color, Color)

Changes border color parameters.

Declaration
public Border.BorderParameters ChangeBorderColors(Color foregroundColor, Color backgroundColor)
Parameters
Type Name Description
Color foregroundColor

Border line foreground Color.

Color backgroundColor

Border line background Color.

Returns
Type Description
Border.BorderParameters

The modified instance of Border.BorderParameters.

ChangeBorderForegroundColor(Color)

Changes border foreground color.

Declaration
public Border.BorderParameters ChangeBorderForegroundColor(Color foregroundColor)
Parameters
Type Name Description
Color foregroundColor

Border line foreground Color.

Returns
Type Description
Border.BorderParameters

The modified instance of Border.BorderParameters.

ChangeBorderGlyph(ColoredGlyphBase)

Fills the array of glyphs to be used as the border line with the given ColoredGlyphBase.

Declaration
public Border.BorderParameters ChangeBorderGlyph(ColoredGlyphBase glyph)
Parameters
Type Name Description
ColoredGlyphBase glyph

The ColoredGlyphBase to be used the border line.

Returns
Type Description
Border.BorderParameters

The modified instance of Border.BorderParameters.

ChangeBorderGlyph(int)

Fills the array of glyphs to be used as the border line with the given glyph.

Declaration
public Border.BorderParameters ChangeBorderGlyph(int glyph)
Parameters
Type Name Description
int glyph

The glyph to be used the border line.

Returns
Type Description
Border.BorderParameters

The modified instance of Border.BorderParameters.

ChangeBorderGlyph(int, Color, Color)

Fills the array of glyphs to be used as the border line with the given glyph and changes the border colors.

Declaration
public Border.BorderParameters ChangeBorderGlyph(int glyph, Color foregroundColor, Color backgroundColor)
Parameters
Type Name Description
int glyph

The glyph to be used the border line.

Color foregroundColor

Border line foreground Color.

Color backgroundColor

Border line background Color.

Returns
Type Description
Border.BorderParameters

The modified instance of Border.BorderParameters.

ChangeBorderGlyph(int[])

Changes the array of glyphs to be used as the border line.

Declaration
public Border.BorderParameters ChangeBorderGlyph(int[] borderStyle)
Parameters
Type Name Description
int[] borderStyle

Array of glyphs to be used as the border line.

Returns
Type Description
Border.BorderParameters

The modified instance of Border.BorderParameters.

ChangeBorderGlyph(int[], Color, Color)

Changes the array of glyphs to be used as the border line and their colors.

Declaration
public Border.BorderParameters ChangeBorderGlyph(int[] borderStyle, Color foregroundColor, Color backgroundColor)
Parameters
Type Name Description
int[] borderStyle

Array of glyphs to be used as the border line.

Color foregroundColor

Border line foreground Color.

Color backgroundColor

Border line background Color.

Returns
Type Description
Border.BorderParameters

The modified instance of Border.BorderParameters.

ChangeBorderStyle(ShapeParameters)

Set the BorderBox parameter to the new value.

Declaration
public Border.BorderParameters ChangeBorderStyle(ShapeParameters borderStyle)
Parameters
Type Name Description
ShapeParameters borderStyle

New ShapeParameters to use for the border style.

Returns
Type Description
Border.BorderParameters

The modified instance of Border.BorderParameters.

GetDefault()

Creates an instance of BorderParameters with the thin line as a border, no title and no shadow.

Declaration
public static Border.BorderParameters GetDefault()
Returns
Type Description
Border.BorderParameters
In this article

Back to top

Back to top Generated by DocFX