Tuesday, September 4, 2012

Set font style without System.Drawing

Set font style without System.Drawing

I'm facing a awkward problem. I can't set the FontStyle of a text. This is annoying me cause until now I'm not able to understand why the System. Drawing is missing, why I can't import her (At least I think I shouldn't).

The context is I'm in a silverlight application, setting the font color and style of a dynamic tree.

I'm using System.Windows.Media.SolidColorBrush to the Foreground, but I trying to set the FontStyle without success. And all google that I try answer the simple: 'use System.Drawing'

What I'm missing here?

Answers & Comments...

Answer: 1

You should not try to create a new FontStyle struct, but use the static properties of FontStyles: FontStyles.Italic or FontStyles.Normal.

by : ekholmhttp://stackoverflow.com/users/1436684




No comments:

Post a Comment

Send us your comment related to the topic mentioned on the blog