ToggleSwitch is a control in the Silverlight for Windows Phone Toolkit. It's designed to facilitate the Boolean off/on settings as seen on native settings pages. However, you can re-template the header and content to achieve different looks and functionality.

Since the styles of the content and header are different by default, the content was chosen to inherit ToggleSwitch's font and content alignment properties. So you can set Foreground, FontFamily, FontSize, HorizontalContentAlignment, and VerticalContentAlignment directly on ToggleSwitch and it will apply to the content. If you want to do this for the header, you have to re-template it:

<controls:ToggleSwitch Header="Test">
<controls:ToggleSwitch.HeaderTemplate>
<DataTemplate>
<ContentControl Content="{Binding}" Foreground="Red"/>
</DataTemplate>
</controls:ToggleSwitch.HeaderTemplate>
</controls:ToggleSwitch>

You can also re-template the content. Here's how to achieve an alarm clock setting:

<toolkit:ToggleSwitch.ContentTemplate>
<DataTemplate>
<StackPanel>
<StackPanel Orientation="Horizontal">
<TextBlock
Text="Alarm: "
FontSize="{StaticResourcePhoneFontSizeSmall}"/>
<ContentControl
HorizontalAlignment="Left"
FontSize="{StaticResource PhoneFontSizeSmall}"
Content="{Binding}"/>
</StackPanel>
<TextBlock
Text="every school day"
FontSize="{StaticResourcePhoneFontSizeSmall}"
Foreground="{StaticResource PhoneSubtleBrush}"/>
</StackPanel>
</DataTemplate>
</toolkit:ToggleSwitch.ContentTemplate>
</toolkit:ToggleSwitch>

The SwitchBackground and SwitchThumb template parts are necessary to optimize the animation for Windows Phone, since translation render transformations are run on the compositor thread. The RenderTransform properties of these parts are set to TranslateTransforms in the template, and those transforms are used later for the animation. This was a design compromise to optimize for the hardware. In general, when animating, you want to do as much of it as possible on the compositor thread, and for controls with dynamic sizes or animations that change depending on input, you have to publicly expose them as template parts to get at their transforms in code.

The maximum horizontal extent of the animation is determined by the actual width of the track part, the actual width of the thumb part, and the left and right margins of the thumb part:

maximum = track.ActualWidth - thumb.ActualWidth - thumb.Margin.Left - thumb.Margin.Right

The left and right margins are included because the default template uses negative margins to hide the left and ride sides of the thumb part to some extent to match the native control.

Read more about Windows Phone performance optimizations.