Table of Contents

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

Name string
Palette Palette
Typography Typography
Metrics Metrics

Properties

Dark

Dark theme (default).

public static Theme Dark { get; }

Property Value

Theme

DefaultStyle

Default vector style derived from the palette.

public VectorStyle DefaultStyle { get; init; }

Property Value

VectorStyle

Light

Light theme.

public static Theme Light { get; }

Property Value

Theme

Metrics

public Metrics Metrics { get; init; }

Property Value

Metrics

Name

public string Name { get; init; }

Property Value

string

Palette

public Palette Palette { get; init; }

Property Value

Palette

Typography

public Typography Typography { get; init; }

Property Value

Typography

Methods

StyleFor(Control)

Style for a control: the most specific type override, or DefaultStyle.

public VectorStyle StyleFor(Control control)

Parameters

control Control

Returns

VectorStyle

WithAccent(Color)

Returns a copy of the theme with another accent color.

public Theme WithAccent(Color accent)

Parameters

accent Color

Returns

Theme

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

style VectorStyle

Returns

Theme

Type Parameters

T