Did a quick test of your brush:
<Window.Resources>
<LinearGradientBrush x:Key="StashOTPOptionBGBrush" StartPoint="0,0" EndPoint="0,1">
<GradientStop Offset="0" Color="#888888"/>
<GradientStop Offset="1" Color="#222222"/>
</LinearGradientBrush>
</Window.Resources>
<Grid Background="{StaticResource StashOTPOptionBGBrush}">
</Grid>
Works fine.
Now for the
ControlTemplate
as a style:
<Window.Resources>
<LinearGradientBrush x:Key="StashOTPOptionBGBrush" StartPoint="0,0" EndPoint="0,1">
<GradientStop Offset="0" Color="#888888"/>
<GradientStop Offset="1" Color="#222222"/>
</LinearGradientBrush>
<Style x:Key="MyRadioButtonStyle" TargetType="RadioButton">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="RadioButton">
<StackPanel Orientation="Horizontal" VerticalAlignment="Center">
<Grid>
<Ellipse Width="16" Height="16" Fill="{TemplateBinding Background}"
Stroke="{TemplateBinding BorderBrush}"
StrokeThickness="{TemplateBinding BorderThickness}"/>
<Ellipse x:Name="Checked" Width="10" Height="10" Fill="Black" Visibility="Collapsed"/>
</Grid>
<Label Margin="5 0 0 0" Content="{TemplateBinding Content}"
Foreground="White"
Background="{StaticResource StashOTPOptionBGBrush}"/>
</StackPanel>
<ControlTemplate.Triggers>
<Trigger Property="IsChecked" Value="True">
<Setter TargetName="Checked" Property="Visibility" Value="Visible"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</Window.Resources>
Then to apply:
<Grid>
<RadioButton HorizontalAlignment="Center"
VerticalAlignment="Center"
Content="Check if wanted"
Style="{StaticResource MyRadioButtonStyle}"/>
</Grid>