Table of Contents

Class WidgetStyle

Namespace
Myra.Graphics2D.UI.Styles
Assembly
Myra.dll

Base style class that defines common visual properties for widgets.

public class WidgetStyle
Inheritance
WidgetStyle
Derived
Inherited Members

Constructors

WidgetStyle()

Initializes a new instance of the WidgetStyle class.

public WidgetStyle()

WidgetStyle(WidgetStyle)

Initializes a new instance of the WidgetStyle class by copying properties from another style.

public WidgetStyle(WidgetStyle style)

Parameters

style WidgetStyle

The source style to copy from.

Properties

Background

Gets or sets the brush used for the widget's background.

public IBrush Background { get; set; }

Property Value

IBrush

Border

Gets or sets the brush used for the widget's border.

public IBrush Border { get; set; }

Property Value

IBrush

BorderThickness

Gets or sets the thickness of the widget's border.

public Thickness BorderThickness { get; set; }

Property Value

Thickness

DisabledBackground

Gets or sets the brush used for the widget's background when it is disabled.

public IBrush DisabledBackground { get; set; }

Property Value

IBrush

DisabledBorder

Gets or sets the brush used for the widget's border when it is disabled.

public IBrush DisabledBorder { get; set; }

Property Value

IBrush

FocusedBackground

Gets or sets the brush used for the widget's background when it has focus.

public IBrush FocusedBackground { get; set; }

Property Value

IBrush

FocusedBorder

Gets or sets the brush used for the widget's border when it has focus.

public IBrush FocusedBorder { get; set; }

Property Value

IBrush

Height

Gets or sets the fixed height of the widget in pixels, or null for auto-sizing.

public int? Height { get; set; }

Property Value

int?

Id

Gets or sets the style identifier.

public string Id { get; set; }

Property Value

string

Margin

Gets or sets the space outside the widget's border.

public Thickness Margin { get; set; }

Property Value

Thickness

MaxHeight

Gets or sets the maximum height of the widget in pixels, or null for no maximum.

public int? MaxHeight { get; set; }

Property Value

int?

MaxWidth

Gets or sets the maximum width of the widget in pixels, or null for no maximum.

public int? MaxWidth { get; set; }

Property Value

int?

MinHeight

Gets or sets the minimum height of the widget in pixels, or null for no minimum.

public int? MinHeight { get; set; }

Property Value

int?

MinWidth

Gets or sets the minimum width of the widget in pixels, or null for no minimum.

public int? MinWidth { get; set; }

Property Value

int?

OverBackground

Gets or sets the brush used for the widget's background when the mouse is over it.

public IBrush OverBackground { get; set; }

Property Value

IBrush

OverBorder

Gets or sets the brush used for the widget's border when the mouse is over it.

public IBrush OverBorder { get; set; }

Property Value

IBrush

Padding

Gets or sets the space inside the widget's border but outside its content.

public Thickness Padding { get; set; }

Property Value

Thickness

PressedBackground

Gets or sets the brush used for the widget's background when it is pressed.

public IBrush PressedBackground { get; set; }

Property Value

IBrush

PressedBorder

Gets or sets the brush used for the widget's border when it is pressed.

public IBrush PressedBorder { get; set; }

Property Value

IBrush

Width

Gets or sets the fixed width of the widget in pixels, or null for auto-sizing.

public int? Width { get; set; }

Property Value

int?

Methods

Clone()

Creates a deep copy of this style.

public virtual WidgetStyle Clone()

Returns

WidgetStyle

A new WidgetStyle instance with the same properties.