ratishphilip / wpfspark

A rich UserControl library to enhance the look and feel of WPF applications.
http://www.codeproject.com/Articles/1060961/WPFSpark-v
MIT License
549 stars 84 forks source link

Toggle Switch AccentBrush automatically resets to default value #12

Closed MaxMichel2 closed 3 years ago

MaxMichel2 commented 3 years ago

As the title implies, when I add a ToggleSwitch to my code, I am unable to change the AccentBrush color. When I do, the color immediately switches back but still shows as if it has been changed in the xaml code.

ratishphilip commented 3 years ago

Is the AccentMode property set to System? In that case the toggle button will keep reverting to System Accent color if you try to change the AccentBrush.

Try setting the AccentMode to User and then set the AccentBrush.

MaxMichel2 commented 3 years ago

Is the AccentMode property set to System? In that case the toggle button will keep reverting to System Accent color if you try to change the AccentBrush.

Try setting the AccentMode to User and then set the AccentBrush.

Yep, looking back this was a very dumb question. I even implemented the whole toggle switch myself to see if I could somehow edit parts of it to resolve the issue before finding this option.

Thanks a lot for the rapid reply!