Stator.libPublic.WinForms Namespace

Windows Forms controls that render correctly under the Stator theme.

Remarks

Several standard Windows Forms controls delegate their appearance to the operating system and ignore BackColor and ForeColor - most visibly on a dark theme. The controls here are owner-drawn replacements that honour the colours in AppTheme.

ThemedComboBox, ThemedCheckBox and ThemedTabControl each expose an ApplyTheme method, and ApplyTheme(Control, AppTheme) recognises them and calls it automatically when walking a control tree. A plugin that uses these controls therefore gets correct theming without writing any drawing code.

Classes

ThemedCheckBox A CheckBox which draws its own caption text so that the foreground colour of an AppTheme is honoured, including in the disabled state.
ThemedComboBox A drop-down list built from a Panel, a read-only TextBox and a borderless popup Form, so that every part of it can be coloured from an AppTheme.
ThemedTabControl A fully owner-drawn TabControl whose tabs, content border and tab pages all follow an AppTheme.