Skip to content



Colour swatches on different platforms have widely differing appearances. XUIColorSwatch handles this by using Renderers. A renderer is a class that implements this interface. It exposes methods called by XUIColorSwatch to alter its appearance. Several examples are provided with XUI.


Name Parameters Returns
Constructor owner As XUIColorSwatch
Owner XUIColorSwatch
RecommendedHeight Double
RecommendedWidth Double
Render g As Graphics

Method Descriptions

Constructor(owner As XUIColorSwatch) owner is the XUIColorSwatch that owns this renderer.

Owner() As XUIColorSwatch This renderer's owning ColorSwatch.

RecommendedHeight() As Double The recommended height (in pixels) the colour swatch should be.

RecommendedWidth() As Double The recommended width (in pixels) the colour swatch should be.

Render(g As Graphics) Renders the swatch to the passed graphics context.