Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>[I'm just adding upon the solutions of fatty and stukselbax]</p> <p>It seems that you'll need to change the <code>Template</code> of the RadioButton. Bellow is a default Aero (Win7) style with a modified template, see the comment in the code. For the code to work, add this namespace: <code>xmlns:Microsoft_Windows_Themes="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Aero"</code> and make sure you reference the <code>PresentationFramework.Aero.dll</code> assembly.</p> <pre><code>&lt;Style x:Key="CheckRadioFocusVisual"&gt; &lt;Setter Property="Control.Template"&gt; &lt;Setter.Value&gt; &lt;ControlTemplate&gt; &lt;Rectangle Margin="14,0,0,0" SnapsToDevicePixels="true" Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" StrokeThickness="1" StrokeDashArray="1 2"/&gt; &lt;/ControlTemplate&gt; &lt;/Setter.Value&gt; &lt;/Setter&gt; &lt;/Style&gt; &lt;Style TargetType="{x:Type RadioButton}"&gt; &lt;Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/&gt; &lt;Setter Property="Background" Value="#F4F4F4"/&gt; &lt;Setter Property="BorderBrush" Value="{StaticResource CheckBoxStroke}"/&gt; &lt;Setter Property="BorderThickness" Value="1"/&gt; &lt;Setter Property="Template"&gt; &lt;Setter.Value&gt; &lt;ControlTemplate TargetType="{x:Type RadioButton}"&gt; &lt;BulletDecorator Background="Transparent"&gt; &lt;BulletDecorator.Bullet&gt; &lt;Grid&gt; &lt;!--This is where you decide about the size of the hit area, the Border bellow has to be transparent and it's acting as the hit area. The Width and Height on the BulletChrome is a modification to bring the size of the bullet back to original size (or close to it)--&gt; &lt;Border Background="Transparent" Width="50" Height="50"/&gt; &lt;Microsoft_Windows_Themes:BulletChrome Width="20" Height="20" BorderBrush="{TemplateBinding BorderBrush}" Background="{TemplateBinding Background}" IsChecked="{TemplateBinding IsChecked}" IsRound="true" RenderMouseOver="{TemplateBinding IsMouseOver}" RenderPressed="{TemplateBinding IsPressed}"/&gt; &lt;/Grid&gt; &lt;/BulletDecorator.Bullet&gt; &lt;ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/&gt; &lt;/BulletDecorator&gt; &lt;ControlTemplate.Triggers&gt; &lt;Trigger Property="HasContent" Value="true"&gt; &lt;Setter Property="FocusVisualStyle" Value="{StaticResource CheckRadioFocusVisual}"/&gt; &lt;Setter Property="Padding" Value="4,0,0,0"/&gt; &lt;/Trigger&gt; &lt;Trigger Property="IsEnabled" Value="false"&gt; &lt;Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/&gt; &lt;/Trigger&gt; &lt;/ControlTemplate.Triggers&gt; &lt;/ControlTemplate&gt; &lt;/Setter.Value&gt; &lt;/Setter&gt; &lt;/Style&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload