BinarySkinKeys
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 | |
|---|---|
AccentBrush | Gets the key of the brush in BinarySkinColor.Accent. |
AccentStrokeBrush | Gets the key of the brush in BinarySkinColor.AccentStroke. |
AccentTextBrush | Gets the key of the brush in BinarySkinColor.AccentText. |
CanvasBrush | Gets the key of the brush in BinarySkinColor.Canvas. |
CanvasHoverBrush | Gets the key of the brush in BinarySkinColor.CanvasHover. |
CanvasPressedBrush | Gets the key of the brush in BinarySkinColor.CanvasPressed. |
CanvasTextBrush | Gets the key of the brush in BinarySkinColor.CanvasText. |
CornerRadius | Gets the key of the skin's corner rounding, a CornerRadius. |
Density | Gets the key of BinarySkinManager.Density, a BinarySkinDensity. |
DividerBrush | Gets the key of the brush in BinarySkinColor.Divider. |
FieldBrush | Gets the key of the brush in BinarySkinColor.Field. |
HoverBrush | Gets the key of the brush in BinarySkinColor.Hover. |
IsDark | Gets the key of whether the skin in force is a dark one, a bool. |
PressedBrush | Gets the key of the brush in BinarySkinColor.Pressed. |
SecondaryTextBrush | Gets the key of the brush in BinarySkinColor.SecondaryText. |
StrokeBrush | Gets the key of the brush in BinarySkinColor.Stroke. |
SurfaceBrush | Gets the key of the brush in BinarySkinColor.Surface. |
SurfaceTextBrush | Gets the key of the brush in BinarySkinColor.SurfaceText. |
WindowBorderBrush | Gets the key of the brush in BinarySkinColor.WindowBorder. |
| Methods | |
Brush | Gets the key of the brush in one of the skin's colours. |
Color | Gets the key of one of the skin's colours as a Color, for a
gradient stop or an effect. |
Properties
AccentBrush static
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
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
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
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
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
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
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
Gets the key of the skin's corner rounding, a CornerRadius.
- Value
- The resource key, for a
Border'sCornerRadius.
Density static
Gets the key of BinarySkinManager.Density, a BinarySkinDensity.
- Value
- The resource key, for a trigger that loosens a layout for touch.
DividerBrush static
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
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
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
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
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
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
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
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
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
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
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
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.