Custodio
Custodio

Reputation: 8954

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?

Upvotes: 0

Views: 699

Answers (1)

ekholm
ekholm

Reputation: 2573

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

Upvotes: 1

Related Questions