DaisyThemeSwap

Overview

DaisyThemeSwap is a themed variant of DaisySwap for toggling light/dark (or any two) themes. It defaults to a rotate transition and keeps IsChecked in sync with the current theme's light/dark status. Clicking applies LightTheme or DarkTheme via DaisyThemeManager.

Properties

Property Description
LightTheme Theme applied when toggling to light (default “Light”).
DarkTheme Theme applied when toggling to dark (default “Dark”).
OnContent / OffContent / IndeterminateContent Inherited from DaisySwap for custom visuals.
TransitionEffect Inherited; defaults to Rotate.

Behavior

Quick Examples

<!-- Simple light/dark swap -->
<controls:DaisyThemeSwap>
    <controls:DaisySwap.OnContent>
        <PathIcon Data="{StaticResource DaisyIconMoon}" />
    </controls:DaisySwap.OnContent>
    <controls:DaisySwap.OffContent>
        <PathIcon Data="{StaticResource DaisyIconSun}" />
    </controls:DaisySwap.OffContent>
</controls:DaisyThemeSwap>

<!-- Custom theme pair -->
<controls:DaisyThemeSwap LightTheme="Corporate" DarkTheme="Synthwave" />

Tips & Best Practices