Class Border
Draws a border, background, or both around another element.
Inheritance
System.Object
Border
Namespace: Terminal.Gui
Assembly: Terminal.Gui.dll
Syntax
public class Border : Object
Constructors
Border()
Declaration
public Border()
Properties
ActualHeight
Gets the rendered height of this element.
Declaration
public int ActualHeight { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
ActualWidth
Gets the rendered width of this element.
Declaration
public int ActualWidth { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
Background
Declaration
public Color Background { get; set; }
Property Value
Type | Description |
---|---|
Color |
BorderBrush
Gets or sets the Color that draws the outer border color.
Declaration
public Color BorderBrush { get; set; }
Property Value
Type | Description |
---|---|
Color |
BorderStyle
Specifies the BorderStyle for a view.
Declaration
public BorderStyle BorderStyle { get; set; }
Property Value
Type | Description |
---|---|
BorderStyle |
BorderThickness
Declaration
public Thickness BorderThickness { get; set; }
Property Value
Type | Description |
---|---|
Thickness |
Child
Gets or sets the single child element of a View.
Declaration
public View Child { get; set; }
Property Value
Type | Description |
---|---|
View |
ChildContainer
Gets or private sets by the Border.ToplevelContainer
Declaration
public Border.ToplevelContainer ChildContainer { get; }
Property Value
Type | Description |
---|---|
Border.ToplevelContainer |
DrawMarginFrame
Gets or sets if a margin frame is drawn around the Child regardless the BorderStyle
Declaration
public bool DrawMarginFrame { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Effect3D
Gets or sets the 3D effect around the Border.
Declaration
public bool Effect3D { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Effect3DBrush
Gets or sets the color for the Border
Declaration
public Nullable<Attribute> Effect3DBrush { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<Attribute> |
Effect3DOffset
Get or sets the offset start position for the Effect3D
Declaration
public Point Effect3DOffset { get; set; }
Property Value
Type | Description |
---|---|
Point |
Padding
Gets or sets a Thickness value that describes the amount of space between a
Border and its child element.
Declaration
public Thickness Padding { get; set; }
Property Value
Type | Description |
---|---|
Thickness |
Parent
Gets the parent Child parent if any.
Declaration
public View Parent { get; }
Property Value
Type | Description |
---|---|
View |
Methods
DrawContent(View, Boolean)
Declaration
public void DrawContent(View view = null, bool fill = true)
Parameters
Type | Name | Description |
---|---|---|
View | view | The view to draw. |
System.Boolean | fill | If it will clear or not the content area. |
DrawFullContent()
Same as DrawContent(View, Boolean) but drawing full frames for all borders.
Declaration
public void DrawFullContent()
DrawTitle(View, Rect)
Drawn the view text from a View.
Declaration
public void DrawTitle(View view, Rect rect)
Parameters
Type | Name | Description |
---|---|---|
View | view | |
Rect | rect |
GetSumThickness()
Calculate the sum of the Padding and the BorderThickness
Declaration
public Thickness GetSumThickness()
Returns
Type | Description |
---|---|
Thickness | The total of the Border Thickness |
OnBorderChanged()
Invoke the BorderChanged event.
Declaration
public virtual void OnBorderChanged()
Events
BorderChanged
Event to be invoked when any border property change.
Declaration
public event Action<Border> BorderChanged
Event Type
Type | Description |
---|---|
System.Action<Border> |