XUIColorSwatchRendererWindows11
Implements XUIColorSwatchRenderer
Description
Renders a color swatch mimicking Windows 11.
Properties
Name | Type | Read-Only |
---|---|---|
mActiveBorderColor | ColorGroup |
|
mOwner | WeakRef |
Methods
Name | Parameters | Returns |
---|---|---|
Constructor | owner As XUIColorSwatch |
|
InitialiseColorGroups | ||
Owner | XUIColorSwatch |
|
RecommendedHeight | Double |
|
RecommendedWidth | Double |
|
Render | g As Graphics |
Constants
Name | Type |
---|---|
ACTIVE_BORDER_COLOR_DARK | Color |
ACTIVE_BORDER_COLOR_LIGHT | Color |
ACTIVE_BORDER_COLOR_DARK As Color The dark mode colour for the border when active.
ACTIVE_BORDER_COLOR_LIGHT As Color The light mode colour for the border when active.
Property Descriptions
mActiveBorderColor As ColorGroup
The colour to use for the swatch border when active.
mOwner As WeakRef
A weak reference to the owning ColorSwatch.
Method Descriptions
Constructor(owner As XUIColorSwatch)
Default constructor.
owner
is theXUIColorSwatch
that owns this renderer. A newWeakRef
to it will be created.
InitialiseColorGroups()
Initialises the ColorGroup properties from our built-in constants.
Owner() As XUIColorSwatch
This renderer's owning ColorSwatch.
Part of the XUIColorSwatchRenderer interface.
RecommendedHeight() As Double
The recommended height (in pixels) the colour swatch should be.
Part of the XUIColorSwatchRenderer interface.
RecommendedWidth() As Double
The recommended width (in pixels) the colour swatch should be.
Part of the XUIColorSwatchRenderer interface.
Render(g As Graphics)
Renders the swatch to the passed graphics context.
Part of the XUIColorSwatchRenderer interface.