title: Changing Radio Button Boder Color and Dot color in WP7
body: <p>I have a radio button in a .xaml file, like this:</p>
  
  <pre><code>&lt;RadioButton IsChecked="True" Style="{StaticResource rdbResultsView}" 
                                   Template="{StaticResource RadioButtonControlTemplate1}"&gt;&lt;/RadioButton&gt;
  </code></pre>
  
  <p>Style is:</p>
  
  <pre><code>&lt;Style x:Key="rdbResultsView" TargetType="RadioButton"&gt;
          &lt;Setter Property="Foreground" Value="Transparent"/&gt;
          &lt;Setter Property="Background" Value="White" /&gt;
          &lt;Setter Property="VerticalAlignment" Value="Center" /&gt;
          &lt;Setter Property="HorizontalAlignment" Value="Center" /&gt;
  &lt;/Style&gt;
  </code></pre>
  
  <p>Template is:</p>
  
  <pre><code>&lt;ControlTemplate x:Key="RadioButtonControlTemplate1" TargetType="RadioButton"&gt;
          &lt;Grid Background="Transparent" &gt;
              &lt;VisualStateManager.VisualStateGroups&gt;
                  &lt;VisualStateGroup x:Name="CommonStates"&gt;
                      &lt;VisualState x:Name="Normal"/&gt;
                      &lt;VisualState x:Name="MouseOver"/&gt;
                      &lt;VisualState x:Name="Pressed" &gt;
                          &lt;Storyboard&gt;
                              &lt;ObjectAnimationUsingKeyFrames Storyboard.TargetName="EnabledCheckBackground" Storyboard.TargetProperty="Visibility"&gt;
                                  &lt;DiscreteObjectKeyFrame KeyTime="0"&gt;
                                      &lt;DiscreteObjectKeyFrame.Value&gt;
                                          &lt;Visibility&gt;Collapsed&lt;/Visibility&gt;
                                      &lt;/DiscreteObjectKeyFrame.Value&gt;
                                  &lt;/DiscreteObjectKeyFrame&gt;
                              &lt;/ObjectAnimationUsingKeyFrames&gt;
                              &lt;ObjectAnimationUsingKeyFrames Storyboard.TargetName="PressedDarkCheckBackground" Storyboard.TargetProperty="Visibility"&gt;
                                  &lt;DiscreteObjectKeyFrame KeyTime="0"&gt;
                                      &lt;DiscreteObjectKeyFrame.Value&gt;
                                          &lt;Visibility&gt;Visible&lt;/Visibility&gt;
                                      &lt;/DiscreteObjectKeyFrame.Value&gt;
                                  &lt;/DiscreteObjectKeyFrame&gt;
                              &lt;/ObjectAnimationUsingKeyFrames&gt;
                              &lt;ObjectAnimationUsingKeyFrames Storyboard.TargetName="PressedLightCheckBackground" Storyboard.TargetProperty="Visibility"&gt;
                                  &lt;DiscreteObjectKeyFrame KeyTime="0"&gt;
                                      &lt;DiscreteObjectKeyFrame.Value&gt;
                                          &lt;Visibility&gt;Visible&lt;/Visibility&gt;
                                      &lt;/DiscreteObjectKeyFrame.Value&gt;
                                  &lt;/DiscreteObjectKeyFrame&gt;
                              &lt;/ObjectAnimationUsingKeyFrames&gt;
                              &lt;ObjectAnimationUsingKeyFrames Storyboard.TargetName="CheckMark" Storyboard.TargetProperty="Fill"&gt;
                                  &lt;DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource PhoneRadioCheckBoxCheckBrush}" /&gt;
                              &lt;/ObjectAnimationUsingKeyFrames&gt;
                          &lt;/Storyboard&gt;
                      &lt;/VisualState&gt;
                      &lt;VisualState x:Name="Disabled"&gt;
                          &lt;Storyboard&gt;
                              &lt;ObjectAnimationUsingKeyFrames Storyboard.TargetName="EnabledCheckBackground" Storyboard.TargetProperty="Visibility"&gt;
                                  &lt;DiscreteObjectKeyFrame KeyTime="0"&gt;
                                      &lt;DiscreteObjectKeyFrame.Value&gt;
                                          &lt;Visibility&gt;Collapsed&lt;/Visibility&gt;
                                      &lt;/DiscreteObjectKeyFrame.Value&gt;
                                  &lt;/DiscreteObjectKeyFrame&gt;
                              &lt;/ObjectAnimationUsingKeyFrames&gt;
                              &lt;ObjectAnimationUsingKeyFrames Storyboard.TargetName="DisabledDarkCheckBackground" Storyboard.TargetProperty="Visibility"&gt;
                                  &lt;DiscreteObjectKeyFrame KeyTime="0"&gt;
                                      &lt;DiscreteObjectKeyFrame.Value&gt;
                                          &lt;Visibility&gt;Visible&lt;/Visibility&gt;
                                      &lt;/DiscreteObjectKeyFrame.Value&gt;
                                  &lt;/DiscreteObjectKeyFrame&gt;
                              &lt;/ObjectAnimationUsingKeyFrames&gt;
                              &lt;ObjectAnimationUsingKeyFrames Storyboard.TargetName="DisabledLightCheckBackground" Storyboard.TargetProperty="Visibility"&gt;
                                  &lt;DiscreteObjectKeyFrame KeyTime="0"&gt;
                                      &lt;DiscreteObjectKeyFrame.Value&gt;
                                          &lt;Visibility&gt;Visible&lt;/Visibility&gt;
                                      &lt;/DiscreteObjectKeyFrame.Value&gt;
                                  &lt;/DiscreteObjectKeyFrame&gt;
                              &lt;/ObjectAnimationUsingKeyFrames&gt;
                              &lt;ObjectAnimationUsingKeyFrames Storyboard.TargetName="CheckMark" Storyboard.TargetProperty="Fill"&gt;
                                  &lt;DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource PhoneRadioCheckBoxCheckDisabledBrush}" /&gt;
                              &lt;/ObjectAnimationUsingKeyFrames&gt;
                              &lt;ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentContainer" Storyboard.TargetProperty="Foreground"&gt;
                                  &lt;DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource PhoneDisabledBrush}" /&gt;
                              &lt;/ObjectAnimationUsingKeyFrames&gt;
                          &lt;/Storyboard&gt;
                      &lt;/VisualState&gt;
                  &lt;/VisualStateGroup&gt;
                  &lt;VisualStateGroup x:Name="CheckStates"&gt;
                      &lt;VisualState x:Name="Checked"&gt;
                          &lt;Storyboard&gt;
                              &lt;ObjectAnimationUsingKeyFrames Storyboard.TargetName="CheckMark" Storyboard.TargetProperty="Visibility"&gt;
                                  &lt;DiscreteObjectKeyFrame KeyTime="0"&gt;
                                      &lt;DiscreteObjectKeyFrame.Value&gt;
                                          &lt;Visibility&gt;Visible&lt;/Visibility&gt;
                                      &lt;/DiscreteObjectKeyFrame.Value&gt;
                                  &lt;/DiscreteObjectKeyFrame&gt;
                              &lt;/ObjectAnimationUsingKeyFrames&gt;
                          &lt;/Storyboard&gt;
                      &lt;/VisualState&gt;
                      &lt;VisualState x:Name="Unchecked" /&gt;
                      &lt;VisualState x:Name="Indeterminate"/&gt;
                  &lt;/VisualStateGroup&gt;
              &lt;/VisualStateManager.VisualStateGroups&gt;
              &lt;Grid Margin="{StaticResource PhoneTouchTargetLargeOverhang}"&gt;
                  &lt;Grid.ColumnDefinitions&gt;
                      &lt;ColumnDefinition Width="32"/&gt;
                      &lt;ColumnDefinition Width="*"/&gt;
                  &lt;/Grid.ColumnDefinitions&gt;
                  &lt;Ellipse x:Name="EnabledCheckBackground" IsHitTestVisible="False" VerticalAlignment="Center" HorizontalAlignment="Left" Fill="{TemplateBinding Background}" Height="32" Width="32"/&gt;
                  &lt;Canvas Opacity="{StaticResource PhoneDarkThemeOpacity}" IsHitTestVisible="False" VerticalAlignment="Center" HorizontalAlignment="Left" Height="32" Width="32"&gt;
                      &lt;Ellipse x:Name="PressedDarkCheckBackground" Fill="{StaticResource PhoneRadioCheckBoxPressedBrush}" Height="32" Width="32" Visibility="Collapsed"/&gt;
                      &lt;Ellipse x:Name="DisabledDarkCheckBackground" Fill="{StaticResource PhoneRadioCheckBoxDisabledBrush}" Height="32" Width="32" Visibility="Collapsed"/&gt;
                  &lt;/Canvas&gt;
                  &lt;Canvas Opacity="{StaticResource PhoneLightThemeOpacity}" IsHitTestVisible="False" VerticalAlignment="Center" HorizontalAlignment="Left" Height="32" Width="32"&gt;
                      &lt;Ellipse x:Name="PressedLightCheckBackground" Fill="{StaticResource PhoneRadioCheckBoxPressedBrush}" Stroke="{StaticResource PhoneForegroundBrush}" StrokeThickness="{StaticResource PhoneStrokeThickness}" Height="32" Width="32" Visibility="Collapsed"/&gt;
                      &lt;Ellipse x:Name="DisabledLightCheckBackground" Fill="{StaticResource PhoneRadioCheckBoxDisabledBrush}" Stroke="{StaticResource PhoneDisabledBrush}" StrokeThickness="{StaticResource PhoneStrokeThickness}" Height="32" Width="32" Visibility="Collapsed"/&gt;
                  &lt;/Canvas&gt;
                  &lt;Ellipse x:Name="CheckMark" IsHitTestVisible="False" Visibility="Collapsed" Fill="#009DDF" Height="16" Width="16" HorizontalAlignment="Center" VerticalAlignment="Center" /&gt;
                  &lt;ContentControl x:Name="ContentContainer" Grid.Column="1" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" FontFamily="{TemplateBinding FontFamily}" FontSize="{TemplateBinding FontSize}" Margin="12,0,0,0" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" Padding="{TemplateBinding Padding}" Foreground="{TemplateBinding Foreground}" /&gt;
              &lt;/Grid&gt;
          &lt;/Grid&gt;
      &lt;/ControlTemplate&gt;
  </code></pre>
  
  <p><strong>Here i am able to change the color of the dot in radio button by changing the RadioButtonControlTemplate1 at:</strong> </p>
  
  <pre><code>&lt;Ellipse x:Name="CheckMark" IsHitTestVisible="False" Visibility="Collapsed" Fill="#009DDF" Height="16" Width="16" HorizontalAlignment="Center" VerticalAlignment="Center" /&gt;
  </code></pre>
  
  <p><strong>But here How can change the RadioButton Border Color(BorderBrush)?</strong></p>