Buttons & Toggles
Command and two-state controls — each derives its native WPF primitive
(Button, ToggleButton, ContentControl) and layers on Beep
chrome via the ControlStyle / Theme knobs. Click, Content, IsEnabled and
the toggle events all come from the base type.
TheTechIdea.Beep.WPF.Controls ·
XAML namespace:
xmlns:beep="clr-namespace:TheTechIdea.Beep.WPF.Controls;assembly=TheTechIdea.Beep.WPF.Controls"
ControlStyle
(BeepControlStyle) and Theme (string). These are CLR wrappers
over the inherited BeepChrome attached properties, not DependencyProperties of the control
itself, so they are omitted from the per-control tables below.
On this page
BeepToggle
A two-state toggle rendered from a ContentControl. The XAML template binds an inner
ToggleButton two-way to IsChecked.
class BeepToggle : ContentControl| Property | Type | Description |
|---|---|---|
| IsChecked | bool | The on/off state. Binds two-way by default and affects render. |
<beep:BeepToggle IsChecked="{Binding IsEnabled, Mode=TwoWay}" ControlStyle="Dracula"/>
BeepToggleSwitch
A themed switch that is a native ToggleButton — so
IsChecked, Checked/Unchecked and command support are all
inherited unchanged.
class BeepToggleSwitch : ToggleButtonNo own DependencyProperties — IsChecked and the toggle events come straight from
ToggleButton; the switch look is the skin plus the ControlStyle /
Theme knobs.
<beep:BeepToggleSwitch IsChecked="{Binding DarkMode}" ControlStyle="Fluent"/>
BeepSwitch
An iOS-style two-state switch built on ContentControl; the template binds an inner
ToggleButton two-way to IsChecked.
class BeepSwitch : ContentControl| Property | Type | Description |
|---|---|---|
| IsChecked | bool | The on/off state. Binds two-way by default and affects render. |
<beep:BeepSwitch IsChecked="{Binding NotificationsOn, Mode=TwoWay}" ControlStyle="Apple"/>