Recently, a reader asked how they should go aboutsetting the Typography properties from code-behind.
The original question was about Silverlight, but the approachworks in WPF, Windows 8 and more.
Given the following markup:
<StackPanel>
<TextBlock x:Name="OriginalText"
FontSize="72"
FontFamily="Gabriola"
Text="Hello World!" />
<TextBlock x:Name="ExampleText"
FontSize="72"
FontFamily="Gabriola"
Text="Hello World!" />
</StackPanel>
You can set an attached property such asTypography.StylisticSet5 by using theSetValue method like this:
< ...
Go to the complete details ...
Found interesting? Add this to: