BinarySkins
Makes the built-in skins: the flat look of the current Office applications in four themes, in any accent colour.
public static class BinarySkins
Remarks
Each call makes a new skin, free to change before it is applied. The accent can be any colour: where it is drawn as text or as a line, it is made as dark or as light as it must be to read.
Examples
// Light or dark as the user has chosen in Windows, in the user's accent colour.
BinarySkinManager.Apply(BinarySkins.Create(BinarySkinTheme.System));
// The dark grey skin in the company's own colour.
BinarySkinManager.Apply(BinarySkins.Create(BinarySkinTheme.DarkGray, Color.FromRgb(0xE0, 0x6C, 0x1F)));See also
Members at a glance
| Methods | |
|---|---|
Create | Makes a built-in skin in the accent colour chosen in Windows. |
Create | Makes a built-in skin in the given accent colour. |
Resolve | Gets the theme a built-in skin is drawn as: BinarySkinTheme.System becomes
BinarySkinTheme.White or BinarySkinTheme.Black as Windows is set now;
any other theme is itself. |
| Fields | |
DefaultAccent | The accent used when neither the application nor Windows supplies one: a mid blue, #0F6CBD. |
Methods
Create static
Makes a built-in skin in the accent colour chosen in Windows.
Parameters
theme- The built-in skin.
Returns
A new skin, free to change. Its accent is WindowsAppearance.AccentColor, or
DefaultAccent where Windows keeps none.
Exceptions
ArgumentOutOfRangeExceptionthemeis not a built-in skin.
Create static
Makes a built-in skin in the given accent colour.
Parameters
theme- The built-in skin.
accent- The accent. Any colour will do; its alpha is ignored. Where it is drawn as text or as a line it is made as dark or as light as it must be to read.
Returns
A new skin, free to change, named "Fluent" and the theme ("Fluent Dark Gray" for
BinarySkinTheme.DarkGray), with BinarySkin.BasedOn set to
theme.
Exceptions
ArgumentOutOfRangeExceptionthemeis not a built-in skin.
Resolve static
Gets the theme a built-in skin is drawn as: BinarySkinTheme.System becomes
BinarySkinTheme.White or BinarySkinTheme.Black as Windows is set now;
any other theme is itself.
Parameters
theme- The built-in skin.
Returns
The theme it is drawn as.
Exceptions
ArgumentOutOfRangeExceptionthemeis not a built-in skin.
Fields
DefaultAccent static
The accent used when neither the application nor Windows supplies one: a mid blue, #0F6CBD.