Geeks With Blogs
Silverlighting... Ramblings on Silverlight and occasionally WPF



How to add a custom font to your Silverlight application:

You can include custom fonts in a Silverlight application by importing it. The steps are described below:

Right click on the Silverlight application project name in the Solution Explorer.

Choose Add->New Item from the context menu.

Navigate to the directory in which the custom font is present.

Select the custom font.

Click OK.  The font file is added.

Open Properties window for the font file.

Specify the Build Action as Resource and the Copy to Output Directory property as Copy if newer.

Reference the font in the XAML code using syntax as shown below:


For example, you can write

 <TextBlock Text="Font demo" FontFamily = "Helvetica.ttf#Helvetica"></TextBlock>



Posted on Thursday, July 1, 2010 9:20 AM Silverlight | Back to top

Comments on this post: Adding custom fonts to your Silverlight application

# re: Adding custom fonts to your Silverlight application
Requesting Gravatar...
not Add->New Item, but Add->Existing Item
Left by giorgio on Nov 29, 2012 10:32 PM

# Sign out
Requesting Gravatar...
Basically this is the online helping hand to support you to know about windows 10 desktop sign in and log off.Once you visit this how do i log out in windows 10 then you comes tom know easily how to operate with this functions.Learning charges is also free and no registration.
Left by R_ashwin on Jan 17, 2018 1:51 PM

Your comment:
 (will show your gravatar)

Copyright © Mamta | Powered by: