I have just started working with with Styles and Control Templates and have created the following styles to display a button as text in a grid. I would like to embed Font Styling into the styles for underlining but have not figured it out.
<Style x:Key="TextButtonStyle" TargetType="Button">
<Setter Property="Background" Value="LightGray" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ContentControl">
<ContentPresenter Content="{TemplateBinding Content}" />
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="TextButtonInGridStyle" TargetType="Button" BasedOn="{StaticResource TextButtonStyle}">
<Setter Property="VerticalAlignment" Value="Center" />
<Setter Property="Margin" Value="4,4,4,4" />
</Style>
I would like to embed Font Styling into the styles for underlining but have not figured it out. Is there any way to do this without embedding a TextBlock into the ControlTemplate or nesting a TextBlock in the Button element declaration?
Thanks