Possible Duplicate:
How to set the default font for a wpf application?
Coming from a web development background I often get mixed up on how to assign styles to my controls. What I'd like to do is set a global font family for the entire application.
In my App.xaml
file I have the following
<Style TargetType="{x:Type Window}">
<Setter Property="FontFamily" Value="Helvetica, Arial" />
<Setter Property="FontSize" Value="13" />
</Style>
I've tried changing the target type to Control
but that's not doing anything. I would expect that since everything technically lives in a Window
control that everything would work as expected.
Turns out the TextBlock
control doesn't inherit from Control
. I'm assuming that's most of the problem because 90% of my text is in TextBlock
form.
In CSS I would do something like this:
body {
font-family: Helvetica, Arial;
font-size: 13px;
}