Class Theme
- Namespace
- PluginUI
- Assembly
- PluginUI.dll
Complete theme: palette, typography, metrics, the default vector style and optional per-control-type styles.
public sealed record Theme : IEquatable<Theme>
- Inheritance
-
Theme
- Implements
- Inherited Members
Constructors
Theme(string, Palette, Typography, Metrics)
Complete theme: palette, typography, metrics, the default vector style and optional per-control-type styles.
public Theme(string Name, Palette Palette, Typography Typography, Metrics Metrics)
Parameters
NamestringPalettePaletteTypographyTypographyMetricsMetrics
Properties
Dark
Dark theme (default).
public static Theme Dark { get; }
Property Value
DefaultStyle
Default vector style derived from the palette.
public VectorStyle DefaultStyle { get; init; }
Property Value
Light
Light theme.
public static Theme Light { get; }
Property Value
Metrics
public Metrics Metrics { get; init; }
Property Value
Name
public string Name { get; init; }
Property Value
Palette
public Palette Palette { get; init; }
Property Value
Typography
public Typography Typography { get; init; }
Property Value
Methods
StyleFor(Control)
Style for a control: the most specific type override, or DefaultStyle.
public VectorStyle StyleFor(Control control)
Parameters
controlControl
Returns
WithAccent(Color)
Returns a copy of the theme with another accent color.
public Theme WithAccent(Color accent)
Parameters
accentColor
Returns
WithStyle<T>(VectorStyle)
Returns a copy of the theme where controls of type T (and subclasses) use style.
public Theme WithStyle<T>(VectorStyle style) where T : Control
Parameters
styleVectorStyle
Returns
Type Parameters
T