First define a seperate resource file. In this example /Templates/DefaultStyles.xaml:
<resourcedictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<style x:Key="TextblockHeader">
<setter Property="Control.FontWeight" Value="Bold"/>
<setter Property="Control.FontSize" Value="14"/>
<setter Property="Control.Margin" Value="10,5,10,5"/>
</style>
</resourcedictionary>
The hard part is including this resource in your app/usercontrol.
(more…)