Class SeparatorWidget
- Namespace
- Myra.Graphics2D.UI
- Assembly
- Myra.dll
An abstract base class for separator widgets that display a horizontal or vertical line.
public abstract class SeparatorWidget : Image, IItemWithId, INotifyAttachedPropertyChanged
- Inheritance
-
SeparatorWidget
- Implements
- Derived
- Inherited Members
Constructors
SeparatorWidget(Stylesheet, string)
Initializes a new instance of the SeparatorWidget class with the specified stylesheet and style.
protected SeparatorWidget(Stylesheet stylesheet, string styleName)
Parameters
stylesheetStylesheetThe stylesheet to use for applying the style.
styleNamestringThe name of the style to apply to the separator.
SeparatorWidget(string)
Initializes a new instance of the SeparatorWidget class.
protected SeparatorWidget(string styleName)
Parameters
styleNamestringThe name of the style to apply to the separator.
Properties
Orientation
Gets the orientation (horizontal or vertical) of the separator.
[Browsable(false)]
public abstract Orientation Orientation { get; }
Property Value
Thickness
Gets or sets the thickness of the separator line in pixels.
public int Thickness { get; set; }
Property Value
Methods
ApplySeparatorStyle(SeparatorStyle)
Applies the specified separator style to this separator.
public void ApplySeparatorStyle(SeparatorStyle style)
Parameters
styleSeparatorStyleThe separator style to apply.
ApplyStyle(WidgetStyle)
Applies the specified widget style to this separator.
protected override void ApplyStyle(WidgetStyle style)
Parameters
styleWidgetStyleThe widget style to apply.
CopyFrom(Widget)
Copies the separator properties from another separator widget.
protected override void CopyFrom(Widget w)
Parameters
wWidgetThe source separator to copy from.
InternalMeasure(Point)
Measures the size required for the separator widget based on its orientation.
protected override Point InternalMeasure(Point availableSize)
Parameters
availableSizePointThe available size for the separator.
Returns
- Point
The measured size needed for the separator.
InternalRender(RenderContext)
Renders the separator widget.
public override void InternalRender(RenderContext context)
Parameters
contextRenderContextThe render context to draw with.