Class Stylesheet
- Namespace
- Myra.Graphics2D.UI.Styles
- Assembly
- Myra.dll
Manages a collection of UI styles used throughout the application. Provides access to default styles and named style variants for all UI widgets.
public class Stylesheet
- Inheritance
-
Stylesheet
- Inherited Members
Fields
DefaultStyleName
The default style identifier used when no specific style name is provided.
public const string DefaultStyleName = ""
Field Value
Properties
Atlas
Gets the texture atlas containing all texture regions used in the stylesheet. Skip load, since it is loaded manually
[XmlName("TextureRegionAtlas")]
public TextureRegionAtlas Atlas { get; }
Property Value
ButtonStyle
Gets or sets the default style for button widgets.
public ButtonStyle ButtonStyle { get; set; }
Property Value
ButtonStyles
Gets the dictionary of named button styles, keyed by style identifier.
public Dictionary<string, ButtonStyle> ButtonStyles { get; }
Property Value
CheckBoxStyle
Gets or sets the default style for checkbox widgets.
public CheckButtonStyle CheckBoxStyle { get; set; }
Property Value
CheckBoxStyles
Gets the dictionary of named checkbox styles, keyed by style identifier.
public Dictionary<string, CheckButtonStyle> CheckBoxStyles { get; }
Property Value
ColorPickerDialogStyle
Gets or sets the default style for color picker dialog widgets.
public ColorPickerDialogStyle ColorPickerDialogStyle { get; set; }
Property Value
ColorPickerDialogStyles
Gets the dictionary of named color picker dialog styles, keyed by style identifier.
public Dictionary<string, ColorPickerDialogStyle> ColorPickerDialogStyles { get; }
Property Value
ComboBoxStyle
Gets or sets the default style for combo box widgets.
public ComboBoxStyle ComboBoxStyle { get; set; }
Property Value
ComboBoxStyles
Gets the dictionary of named combo box styles, keyed by style identifier.
public Dictionary<string, ComboBoxStyle> ComboBoxStyles { get; }
Property Value
Current
Gets or sets the current active stylesheet used globally. If not explicitly set, returns the default stylesheet from DefaultAssets.
public static Stylesheet Current { get; set; }
Property Value
DataGridStyle
Gets or sets the default style applied to DataGrid widgets.
public DataGridStyle DataGridStyle { get; set; }
Property Value
DataGridStyles
Gets the dictionary of named DataGrid styles, keyed by style identifier.
public Dictionary<string, DataGridStyle> DataGridStyles { get; }
Property Value
DesktopStyle
Gets or sets the style applied to the desktop background.
public DesktopStyle DesktopStyle { get; set; }
Property Value
FileDialogStyle
Gets or sets the default style for file dialog widgets.
public FileDialogStyle FileDialogStyle { get; set; }
Property Value
FileDialogStyles
Gets the dictionary of named file dialog styles, keyed by style identifier.
public Dictionary<string, FileDialogStyle> FileDialogStyles { get; }
Property Value
Fonts
Gets the collection of fonts used in the stylesheet.
public StylesheetFontsCollection Fonts { get; }
Property Value
GridStyles
Gets the dictionary of named grid styles, keyed by style identifier.
public Dictionary<string, GridStyle> GridStyles { get; }
Property Value
HorizontalMenuStyle
Gets or sets the default style for horizontal menu widgets.
public MenuStyle HorizontalMenuStyle { get; set; }
Property Value
HorizontalMenuStyles
Gets the dictionary of named horizontal menu styles, keyed by style identifier.
public Dictionary<string, MenuStyle> HorizontalMenuStyles { get; }
Property Value
HorizontalProgressBarStyle
Gets or sets the default style for horizontal progress bar widgets.
public ProgressBarStyle HorizontalProgressBarStyle { get; set; }
Property Value
HorizontalProgressBarStyles
Gets the dictionary of named horizontal progress bar styles, keyed by style identifier.
public Dictionary<string, ProgressBarStyle> HorizontalProgressBarStyles { get; }
Property Value
HorizontalSeparatorStyle
Gets or sets the default style for horizontal separator widgets.
public SeparatorStyle HorizontalSeparatorStyle { get; set; }
Property Value
HorizontalSeparatorStyles
Gets the dictionary of named horizontal separator styles, keyed by style identifier.
public Dictionary<string, SeparatorStyle> HorizontalSeparatorStyles { get; }
Property Value
HorizontalSliderStyle
Gets or sets the default style for horizontal slider widgets.
public SliderStyle HorizontalSliderStyle { get; set; }
Property Value
HorizontalSliderStyles
Gets the dictionary of named horizontal slider styles, keyed by style identifier.
public Dictionary<string, SliderStyle> HorizontalSliderStyles { get; }
Property Value
HorizontalSplitPaneStyle
Gets or sets the default style for horizontal split pane widgets.
public SplitPaneStyle HorizontalSplitPaneStyle { get; set; }
Property Value
HorizontalSplitPaneStyles
Gets the dictionary of named horizontal split pane styles, keyed by style identifier.
public Dictionary<string, SplitPaneStyle> HorizontalSplitPaneStyles { get; }
Property Value
HorizontalStackPanelStyle
Gets or sets the default style for horizontal stack panels.
public WidgetStyle HorizontalStackPanelStyle { get; set; }
Property Value
HorizontalStackPanelStyles
Gets the dictionary of named horizontal stack panel styles, keyed by style identifier.
public Dictionary<string, WidgetStyle> HorizontalStackPanelStyles { get; }
Property Value
LabelStyle
Gets or sets the default style for label widgets.
public LabelStyle LabelStyle { get; set; }
Property Value
LabelStyles
Gets the dictionary of named label styles, keyed by style identifier.
public Dictionary<string, LabelStyle> LabelStyles { get; }
Property Value
ListBoxStyle
Gets or sets the default style for list box widgets.
public ListBoxStyle ListBoxStyle { get; set; }
Property Value
ListBoxStyles
Gets the dictionary of named list box styles, keyed by style identifier.
public Dictionary<string, ListBoxStyle> ListBoxStyles { get; }
Property Value
PanelStyle
Gets or sets the default style for panel widgets.
public WidgetStyle PanelStyle { get; set; }
Property Value
PanelStyles
Gets the dictionary of named panel styles, keyed by style identifier.
public Dictionary<string, WidgetStyle> PanelStyles { get; }
Property Value
RadioButtonStyle
Gets or sets the default style for radio button widgets.
public CheckButtonStyle RadioButtonStyle { get; set; }
Property Value
RadioButtonStyles
Gets the dictionary of named radio button styles, keyed by style identifier.
public Dictionary<string, CheckButtonStyle> RadioButtonStyles { get; }
Property Value
ScrollViewerStyle
Gets or sets the default style for scroll viewer widgets.
public ScrollViewerStyle ScrollViewerStyle { get; set; }
Property Value
ScrollViewerStyles
Gets the dictionary of named scroll viewer styles, keyed by style identifier.
public Dictionary<string, ScrollViewerStyle> ScrollViewerStyles { get; }
Property Value
SpinButtonStyle
Gets or sets the default style for spin button widgets.
public SpinButtonStyle SpinButtonStyle { get; set; }
Property Value
SpinButtonStyles
Gets the dictionary of named spin button styles, keyed by style identifier.
public Dictionary<string, SpinButtonStyle> SpinButtonStyles { get; }
Property Value
TabControlStyle
Gets or sets the default style for tab control widgets.
public TabControlStyle TabControlStyle { get; set; }
Property Value
TabControlStyles
Gets the dictionary of named tab control styles, keyed by style identifier.
public Dictionary<string, TabControlStyle> TabControlStyles { get; }
Property Value
TextBoxStyle
Gets or sets the default style for text box widgets.
public TextBoxStyle TextBoxStyle { get; set; }
Property Value
TextBoxStyles
Gets the dictionary of named text box styles, keyed by style identifier.
public Dictionary<string, TextBoxStyle> TextBoxStyles { get; }
Property Value
TooltipStyle
Gets or sets the default style for tooltip labels.
public LabelStyle TooltipStyle { get; set; }
Property Value
TooltipStyles
Gets the dictionary of named tooltip label styles, keyed by style identifier.
public Dictionary<string, LabelStyle> TooltipStyles { get; }
Property Value
TreeStyle
Gets or sets the default style for tree widgets.
public TreeStyle TreeStyle { get; set; }
Property Value
TreeStyles
Gets the dictionary of named tree styles, keyed by style identifier.
public Dictionary<string, TreeStyle> TreeStyles { get; }
Property Value
VerticalMenuStyle
Gets or sets the default style for vertical menu widgets.
public MenuStyle VerticalMenuStyle { get; set; }
Property Value
VerticalMenuStyles
Gets the dictionary of named vertical menu styles, keyed by style identifier.
public Dictionary<string, MenuStyle> VerticalMenuStyles { get; }
Property Value
VerticalProgressBarStyle
Gets or sets the default style for vertical progress bar widgets.
public ProgressBarStyle VerticalProgressBarStyle { get; set; }
Property Value
VerticalProgressBarStyles
Gets the dictionary of named vertical progress bar styles, keyed by style identifier.
public Dictionary<string, ProgressBarStyle> VerticalProgressBarStyles { get; }
Property Value
VerticalSeparatorStyle
Gets or sets the default style for vertical separator widgets.
public SeparatorStyle VerticalSeparatorStyle { get; set; }
Property Value
VerticalSeparatorStyles
Gets the dictionary of named vertical separator styles, keyed by style identifier.
public Dictionary<string, SeparatorStyle> VerticalSeparatorStyles { get; }
Property Value
VerticalSliderStyle
Gets or sets the default style for vertical slider widgets.
public SliderStyle VerticalSliderStyle { get; set; }
Property Value
VerticalSliderStyles
Gets the dictionary of named vertical slider styles, keyed by style identifier.
public Dictionary<string, SliderStyle> VerticalSliderStyles { get; }
Property Value
VerticalSplitPaneStyle
Gets or sets the default style for vertical split pane widgets.
public SplitPaneStyle VerticalSplitPaneStyle { get; set; }
Property Value
VerticalSplitPaneStyles
Gets the dictionary of named vertical split pane styles, keyed by style identifier.
public Dictionary<string, SplitPaneStyle> VerticalSplitPaneStyles { get; }
Property Value
VerticalStackPanelStyle
Gets or sets the default style for vertical stack panels.
public WidgetStyle VerticalStackPanelStyle { get; set; }
Property Value
VerticalStackPanelStyles
Gets the dictionary of named vertical stack panel styles, keyed by style identifier.
public Dictionary<string, WidgetStyle> VerticalStackPanelStyles { get; }
Property Value
WhiteRegion
Gets a white texture region from the atlas, used for solid color rendering.
[Browsable(false)]
public TextureRegion WhiteRegion { get; }
Property Value
WindowStyle
Gets or sets the default style for window widgets.
public WindowStyle WindowStyle { get; set; }
Property Value
WindowStyles
Gets the dictionary of named window styles, keyed by style identifier.
public Dictionary<string, WindowStyle> WindowStyles { get; }
Property Value
Methods
Clone()
Creates a deep copy of this stylesheet including all styles and fonts.
public Stylesheet Clone()
Returns
- Stylesheet
A new Stylesheet instance with cloned styles and fonts.
ToXml()
Converts the stylesheet to an XML string representation.
public string ToXml()
Returns
- string
An XML string containing all styles defined in this stylesheet.