Interface IWindowControl
- Namespace
- SharpConsoleUI.Controls
- Assembly
- SharpConsoleUI.dll
Represents a UI control that can be displayed within a window or container.
public interface IWindowControl : IDisposable
- Inherited Members
- Extension Methods
Properties
ActualWidth
Gets the actual rendered width of the control, or null if not yet rendered.
int? ActualWidth { get; }
Property Value
- int?
Container
Gets or sets the parent container that hosts this control.
IContainer? Container { get; set; }
Property Value
HorizontalAlignment
Gets or sets the horizontal alignment of the control within its container.
HorizontalAlignment HorizontalAlignment { get; set; }
Property Value
Margin
Gets or sets the margin (spacing) around the control.
Margin Margin { get; set; }
Property Value
Name
Gets or sets the unique name identifier for this control, used for lookup.
string? Name { get; set; }
Property Value
StickyPosition
Gets or sets whether this control should stick to the top or bottom during scrolling.
StickyPosition StickyPosition { get; set; }
Property Value
Tag
Gets or sets an arbitrary object value that can be used to store custom data.
object? Tag { get; set; }
Property Value
VerticalAlignment
Gets or sets the vertical alignment of the control within its container.
VerticalAlignment VerticalAlignment { get; set; }
Property Value
Visible
Gets or sets whether this control is visible.
bool Visible { get; set; }
Property Value
Width
Gets or sets the explicit width of the control, or null for automatic sizing.
int? Width { get; set; }
Property Value
- int?
Methods
GetLogicalContentSize()
Gets the logical size of the control's content without rendering.
Size GetLogicalContentSize()
Returns
- Size
The size representing the content's natural dimensions.
Invalidate()
Marks this control as needing to be re-rendered.
void Invalidate()