MaterialDesignInXamlToolkit icon indicating copy to clipboard operation
MaterialDesignInXamlToolkit copied to clipboard

Change MaterialDesignSwitchToggleButton Track background

Open alcsdn opened this issue 1 year ago • 2 comments

Bug explanation

Hello everyone!

I need to change the background color of the MaterialDesignSwitchToggleButton when isChecked=True.

I tried defining a Style based on your Toggle with a trigger, and I noticed that it correctly changes the color of the Thumb (in green), but my intention was to change the color of the Track.

Actual behavior: Toggle Actual

What I want to achieve: Toggle Correct

Is there a straightforward way to accomplish this?

Any help would be appreciated. Best regards

Version

4.9.0

alcsdn avatar Dec 22 '23 15:12 alcsdn

MaterialDesignInXAML3 has a ToggleButton similar to the one you want.

JLdgu avatar Feb 03 '24 11:02 JLdgu

@alcsdn I believe you can accomplish this by setting/modifying the values of these attached properties:

ToggleButtonAssist.SwitchTrackOnBackground ToggleButtonAssist.SwitchTrackOffBackground

nicolaihenriksen avatar Jun 11 '24 08:06 nicolaihenriksen

This issue is marked stale because it has been open 30 days with no activity. Remove stale label or update the issue, otherwise it will be closed in 14 days.

github-actions[bot] avatar Jul 29 '24 01:07 github-actions[bot]

This issue was closed because it has been stalled for 14 days with no activity.

github-actions[bot] avatar Aug 12 '24 01:08 github-actions[bot]