0

I am trying to match the default font of the ToggleSwitch Header property from the WPToolkit to a TextBlock. I've noticed that the default font of the ToggleSwitch header does not math the TextBlock. What can I use to apply the some text foreground to a TextBlock?

4

1 回答 1

0

Have you looked at the existing Style template Setter for that property to see what it's using and just apply the same to the Style template for the other? So if for example we look at the template shared on MSDN for the default Style it shows on line 7;

<Setter Property="FontFamily" Value="{StaticResource ContentControlThemeFontFamily}" />

So you could either set it to that via the default template for TextBlock in the Resource Dictionary or say for example all your instances within a user control like;

<Blah.Resources>
   <Style TargetType="TextBlock">
     <Setter Property="FontFamily" Value="{StaticResource ContentControlThemeFontFamily}" />
   </Style>
</Blah.Resources>

Hope this helps.

UPDATE NOTE: I apparently grabbed the default template of the windows store app Toggle instead of the Windows phone but the same question applies of checking whats in the default template and matching it to the other.

于 2013-10-14T20:26:39.520 回答