This examples illustrates how to create a custom CheckEdit, so it functions as ToggleSwitch. Our custom ToggleSwitch editor contains the following properties:
OnImage and OffImage to determine images for the On and Off states;
OnText and OffText to determine a text that will be shown along with an image based upon a current state;
IsOn to determine whether or not the current state is On.
In addition, we have implemented the ToggleSwitch.Toggled event that is raised when a state is changed.