HypernovaDesktop Components · docs
Binarymission
WPF › Skinning › BinarySkinKeys

BinarySkinKeys

class.NET 6 / 8 / 10.NET Framework 4.8Binarymission.WPF.Skinning

The keys BinarySkinManager publishes the skin in force under, in the application's resources, for a window, a style or a control of your own to draw with.

public static class BinarySkinKeys

Remarks

Refer to them with DynamicResource, so that a change of skin reaches what uses them. Each colour is published twice: as a frozen SolidColorBrush under Brush (or the named property, such as SurfaceBrush, which XAML can reach), and as a Color under Color, for gradients and effects.

While no skin is in force the keys are not published, and a property that refers to one keeps its own default; give it a fallback in a style if that matters.

Examples

<Border xmlns:skin="clr-namespace:Binarymission.WPF.Skinning;assembly=Binarymission.WPF.Skinning"
        Background="{DynamicResource {x:Static skin:BinarySkinKeys.SurfaceBrush}}"
        BorderBrush="{DynamicResource {x:Static skin:BinarySkinKeys.StrokeBrush}}"
        CornerRadius="{DynamicResource {x:Static skin:BinarySkinKeys.CornerRadius}}"
        BorderThickness="1" Padding="12">
    <TextBlock Text="Order summary"
               Foreground="{DynamicResource {x:Static skin:BinarySkinKeys.SurfaceTextBrush}}" />
</Border>

Members at a glance

Properties
AccentBrushGets the key of the brush in BinarySkinColor.Accent.
AccentStrokeBrushGets the key of the brush in BinarySkinColor.AccentStroke.
AccentTextBrushGets the key of the brush in BinarySkinColor.AccentText.
CanvasBrushGets the key of the brush in BinarySkinColor.Canvas.
CanvasHoverBrushGets the key of the brush in BinarySkinColor.CanvasHover.
CanvasPressedBrushGets the key of the brush in BinarySkinColor.CanvasPressed.
CanvasTextBrushGets the key of the brush in BinarySkinColor.CanvasText.
CornerRadiusGets the key of the skin's corner rounding, a CornerRadius.
DensityGets the key of BinarySkinManager.Density, a BinarySkinDensity.
DividerBrushGets the key of the brush in BinarySkinColor.Divider.
FieldBrushGets the key of the brush in BinarySkinColor.Field.
HoverBrushGets the key of the brush in BinarySkinColor.Hover.
IsDarkGets the key of whether the skin in force is a dark one, a bool.
PressedBrushGets the key of the brush in BinarySkinColor.Pressed.
SecondaryTextBrushGets the key of the brush in BinarySkinColor.SecondaryText.
StrokeBrushGets the key of the brush in BinarySkinColor.Stroke.
SurfaceBrushGets the key of the brush in BinarySkinColor.Surface.
SurfaceTextBrushGets the key of the brush in BinarySkinColor.SurfaceText.
WindowBorderBrushGets the key of the brush in BinarySkinColor.WindowBorder.
Methods
BrushGets the key of the brush in one of the skin's colours.
ColorGets the key of one of the skin's colours as a Color, for a gradient stop or an effect.

Properties

AccentBrush static

public static ComponentResourceKey AccentBrush

Gets the key of the brush in BinarySkinColor.Accent.

Value
The resource key of a frozen brush, published while a skin is in force.

AccentStrokeBrush static

public static ComponentResourceKey AccentStrokeBrush

Gets the key of the brush in BinarySkinColor.AccentStroke.

Value
The resource key of a frozen brush, published while a skin is in force.

AccentTextBrush static

public static ComponentResourceKey AccentTextBrush

Gets the key of the brush in BinarySkinColor.AccentText.

Value
The resource key of a frozen brush, published while a skin is in force.

CanvasBrush static

public static ComponentResourceKey CanvasBrush

Gets the key of the brush in BinarySkinColor.Canvas.

Value
The resource key of a frozen brush, published while a skin is in force.

CanvasHoverBrush static

public static ComponentResourceKey CanvasHoverBrush

Gets the key of the brush in BinarySkinColor.CanvasHover.

Value
The resource key of a frozen brush, published while a skin is in force.

CanvasPressedBrush static

public static ComponentResourceKey CanvasPressedBrush

Gets the key of the brush in BinarySkinColor.CanvasPressed.

Value
The resource key of a frozen brush, published while a skin is in force.

CanvasTextBrush static

public static ComponentResourceKey CanvasTextBrush

Gets the key of the brush in BinarySkinColor.CanvasText.

Value
The resource key of a frozen brush, published while a skin is in force.

CornerRadius static

public static ComponentResourceKey CornerRadius

Gets the key of the skin's corner rounding, a CornerRadius.

Value
The resource key, for a Border's CornerRadius.

Density static

public static ComponentResourceKey Density
Value
The resource key, for a trigger that loosens a layout for touch.

DividerBrush static

public static ComponentResourceKey DividerBrush

Gets the key of the brush in BinarySkinColor.Divider.

Value
The resource key of a frozen brush, published while a skin is in force.

FieldBrush static

public static ComponentResourceKey FieldBrush

Gets the key of the brush in BinarySkinColor.Field.

Value
The resource key of a frozen brush, published while a skin is in force.

HoverBrush static

public static ComponentResourceKey HoverBrush

Gets the key of the brush in BinarySkinColor.Hover.

Value
The resource key of a frozen brush, published while a skin is in force.

IsDark static

public static ComponentResourceKey IsDark

Gets the key of whether the skin in force is a dark one, a bool.

Value
The resource key, for a trigger that swaps light and dark artwork.

PressedBrush static

public static ComponentResourceKey PressedBrush

Gets the key of the brush in BinarySkinColor.Pressed.

Value
The resource key of a frozen brush, published while a skin is in force.

SecondaryTextBrush static

public static ComponentResourceKey SecondaryTextBrush

Gets the key of the brush in BinarySkinColor.SecondaryText.

Value
The resource key of a frozen brush, published while a skin is in force.

StrokeBrush static

public static ComponentResourceKey StrokeBrush

Gets the key of the brush in BinarySkinColor.Stroke.

Value
The resource key of a frozen brush, published while a skin is in force.

SurfaceBrush static

public static ComponentResourceKey SurfaceBrush

Gets the key of the brush in BinarySkinColor.Surface.

Value
The resource key of a frozen brush, published while a skin is in force.

SurfaceTextBrush static

public static ComponentResourceKey SurfaceTextBrush

Gets the key of the brush in BinarySkinColor.SurfaceText.

Value
The resource key of a frozen brush, published while a skin is in force.

WindowBorderBrush static

public static ComponentResourceKey WindowBorderBrush

Gets the key of the brush in BinarySkinColor.WindowBorder.

Value
The resource key of a frozen brush, published while a skin is in force.

Methods

Brush static

public static ComponentResourceKey Brush(BinarySkinColor role)

Gets the key of the brush in one of the skin's colours.

Parameters
role
The colour.
Returns

The resource key; equal to the matching named property, such as SurfaceBrush.

Color static

public static ComponentResourceKey Color(BinarySkinColor role)

Gets the key of one of the skin's colours as a Color, for a gradient stop or an effect.

Parameters
role
The colour.
Returns

The resource key.