I'm writing a Windows 8 WinRT app in C#, and would like to dynamically change the color of my ToggleSwitch
. I'll be having multiple instances of these, and they won't all have the same color.
I tried to create a custom control that inherits from ToggleSwitch
, but I quickly learned that I can't do this because ToggleSwitch
is a sealed
class. My goal was to add a DependencyProperty
of type Brush
, and then consume that brush through a TemplateBinding
in my custom control's Template
.
Is there another way of accomplishing this?
for what it is worth I was looking for the same thing recently and found this MS link. Just changing the colors to what you need no styling is necessary unless you really must go that low.
http://msdn.microsoft.com/en-us/library/windows/apps/jj709931.aspx