Set a font family on text in Silverlight

<TextBlock x: Name=" txt" FontFamily="Times New Roman" FontSize="18"> 
 Some Text</TextBlock>

or in code

txt.FontFamily = "Times New Roman"; 
txt.FontSize = "18";

We can use the full name of a typeface to get italic or bold, as shown below:

<TextBlock FontFamily=" Times New Roman Bold">Some Text</TextBlock >

Enjoyed this post? Share it!


Leave a comment

Your email address will not be published.