title: C# WPF Button should be displayed as selected
body: <p><em>I'm using C# WPF Application</em></p>
  
  <p>I need your help.
  If I press on a button it should be selected, but if I now press on another button it should be selected and the other button should not be selected.
  It should show where the user is.The button should be selected until another button has been clicked.</p>
  
  <p>But when you go with the mouse over, the normal mouse over effect should come.</p>
  
  <pre><code>&lt;Window x:Name="windowsForm" x:Class="Vorschau.MainWindow"
          xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
          xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
          xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
          xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
          xmlns:local="clr-namespace:Vorschau"
          mc:Ignorable="d"
          Title="Vorschaukomponente" Height="514.583" Width="805.208" FontFamily="Century Gothic" WindowStartupLocation="Manual" BorderThickness="0" ResizeMode="NoResize" WindowStyle="None" Icon="C:\Users\user\Documents\Visual Studio 2015\Projects\Vorschau\Vorschau\img\coordinates.ico" Background="{x:Null}" AllowsTransparency="True"&gt;
      &lt;Window.Resources&gt;
  
          &lt;Style x:Key="border_res" TargetType="{x:Type Border}"&gt;
              &lt;Setter Property="Background" Value="#3A3A3B" /&gt;
              &lt;Setter Property="CornerRadius" Value="10" /&gt;
          &lt;/Style&gt;
      &lt;/Window.Resources&gt;
  
      &lt;Border Style="{StaticResource border_res}"&gt;
          &lt;Grid&gt;
              &lt;Canvas HorizontalAlignment="Left" Height="60" VerticalAlignment="Top" Width="185" Background="#FFE57E31"&gt;
                  &lt;Canvas Height="64" Canvas.Top="451" Width="185" Background="#FF2C373F"&gt;
                      &lt;Label x:Name="lbCopyright" Content="©  Name 2017" Canvas.Left="10" Canvas.Top="29" Width="121" Foreground="#FF1B1D1F"/&gt;
                  &lt;/Canvas&gt;
                  &lt;Canvas Height="391" Canvas.Top="60" Width="185" Background="#FF37424A"&gt;
                      &lt;Button x:Name="btVorschau" Content="Vorschau" HorizontalAlignment="Left" VerticalAlignment="Bottom" Width="185" Height="50" Foreground="LightGray" FontSize="16"
                  HorizontalContentAlignment="Left" BorderBrush="{x:Null}" Click="Button_Click"&gt;
                          &lt;Button.Style&gt;
                              &lt;Style TargetType="{x:Type Button}"&gt;
                                  &lt;Setter Property="Background" Value="#FF37424A"/&gt;
                                  &lt;Setter Property="Template"&gt;
                                      &lt;Setter.Value&gt;
                                          &lt;ControlTemplate TargetType="{x:Type Button}"&gt;
                                              &lt;Border Background="{TemplateBinding Background}"&gt;
                                                  &lt;ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/&gt;
                                              &lt;/Border&gt;
                                          &lt;/ControlTemplate&gt;
                                      &lt;/Setter.Value&gt;
                                  &lt;/Setter&gt;
                                  &lt;Style.Triggers&gt;
                                      &lt;Trigger Property="IsMouseOver" Value="True"&gt;
                                          &lt;Setter Property="Background" Value="#FF303B43"/&gt;
                                          &lt;Setter Property="Foreground" Value="Red"/&gt;
                                      &lt;/Trigger&gt;
                                  &lt;/Style.Triggers&gt;
                              &lt;/Style&gt;
                          &lt;/Button.Style&gt;
                      &lt;/Button&gt;
                      &lt;Button x:Name="btEinstellung" Content="Einstellung" HorizontalAlignment="Left" VerticalAlignment="Bottom" Width="185" Height="50" Foreground="LightGray" FontSize="16"
                          HorizontalContentAlignment="Left" BorderBrush="{x:Null}" Canvas.Top="50" Click="btEinstellung_Click"&gt;
                          &lt;Button.Style&gt;
                              &lt;Style TargetType="{x:Type Button}"&gt;
                                  &lt;Setter Property="Background" Value="#FF37424A"/&gt;
                                  &lt;Setter Property="Template"&gt;
                                      &lt;Setter.Value&gt;
                                          &lt;ControlTemplate TargetType="{x:Type Button}"&gt;
                                              &lt;Border Background="{TemplateBinding Background}"&gt;
                                                  &lt;ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/&gt;
                                              &lt;/Border&gt;
                                          &lt;/ControlTemplate&gt;
                                      &lt;/Setter.Value&gt;
                                  &lt;/Setter&gt;
                                  &lt;Style.Triggers&gt;
                                      &lt;Trigger Property="IsMouseOver" Value="True"&gt;
                                          &lt;Setter Property="Background" Value="#FF303B43"/&gt;
                                          &lt;Setter Property="Foreground" Value="Red"/&gt;
                                      &lt;/Trigger&gt;
                                  &lt;/Style.Triggers&gt;
                              &lt;/Style&gt;
                          &lt;/Button.Style&gt;
                      &lt;/Button&gt;
                  &lt;/Canvas&gt;
                  &lt;Canvas Height="60" Canvas.Left="185" Width="618" Background="#FFEEE9ED"&gt;
                      &lt;Label x:Name="lbClose" Content="X" Canvas.Left="578" FontSize="20" MouseDoubleClick="lbClose_MouseDoubleClick"/&gt;
                      &lt;Label x:Name="lbMinimize" Content="-" Canvas.Left="556" FontSize="22" Canvas.Top="-2" MouseDoubleClick="lbMinimize_MouseDoubleClick"/&gt;
                      &lt;Label x:Name="lbWhereIAm" Content="Label" Canvas.Left="10" Canvas.Top="15" Width="162" FontSize="20"/&gt;
                  &lt;/Canvas&gt;
                  &lt;Canvas x:Name="canvasContent" Height="455" Canvas.Left="185" Canvas.Top="60" Width="618" Background="#FFD1CFD0"&gt;
                      &lt;TabControl x:Name="tabControl" Height="241" Canvas.Left="93" Canvas.Top="87" Width="440" SelectedIndex="0" ScrollViewer.VerticalScrollBarVisibility="Disabled"&gt;
                          &lt;TabItem x:Name="tabitem1" Header="TabItem"&gt;
                              &lt;Grid Background="#FFE5E5E5"&gt;
                                  &lt;Label x:Name="label1" Content="Label" HorizontalAlignment="Left" Margin="99,95,0,0" VerticalAlignment="Top" Background="#FF2387FF"/&gt;
                              &lt;/Grid&gt;
                          &lt;/TabItem&gt;
                          &lt;TabItem x:Name="tabitem2" Header="TabItem" ScrollViewer.VerticalScrollBarVisibility="Disabled"&gt;
                              &lt;Grid Background="#FFE5E5E5"&gt;
                                  &lt;Label x:Name="label" Content="Label" HorizontalAlignment="Left" Margin="138,124,0,0" VerticalAlignment="Top" Background="#FFF70000"/&gt;
                              &lt;/Grid&gt;
                          &lt;/TabItem&gt;
                      &lt;/TabControl&gt;
                  &lt;/Canvas&gt;
                  &lt;Image x:Name="image" Height="38" Canvas.Left="10" Canvas.Top="10" Width="38" Source="C:\Users\user\Documents\Visual Studio 2015\Projects\Vorschau\Vorschau\img\coordinatesWhite.png"/&gt;
                  &lt;Label x:Name="lbLogoname" Content="Vorschaukomponente" Canvas.Left="37" Canvas.Top="10" Width="143" FontWeight="Bold" Foreground="White"/&gt;
              &lt;/Canvas&gt;
          &lt;/Grid&gt;
      &lt;/Border&gt;
  &lt;/Window&gt;
  </code></pre>