title: Wpf round weird border
body: <p><img src="https://i.stack.imgur.com/uIaQk.png" alt="enter image description here"></p>
  
  <p>Hi</p>
  
  <p>I'm trying for over 2 days now to create toggle button that in pressed state like the above image, but that upper border is giving me a headache. Does anyone have any idea how to create that round corner that goes down? The background is a linear gradient top to bottom: #b8c7d6 - #a8b3c4</p>
  
  <p>Any help at all would be greatly appreciated!!</p>
  
  <p>I have something like this but it is far from the design:</p>
  
  <pre><code>&lt;Style x:Key="ToggleButtonStyle" TargetType="{x:Type ToggleButton}"&gt;
      &lt;Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/&gt;
      &lt;Setter Property="HorizontalContentAlignment" Value="Center"/&gt;
      &lt;Setter Property="VerticalContentAlignment" Value="Center"/&gt;
      &lt;Setter Property="Padding" Value="1"/&gt;
      &lt;Setter Property="Template"&gt;
          &lt;Setter.Value&gt;
              &lt;ControlTemplate TargetType="{x:Type ToggleButton}"&gt;
                  &lt;Grid&gt;
                      &lt;Border Background="Black" BorderThickness="1" BorderBrush="#FF4E4F50" CornerRadius="3"/&gt;
                      &lt;Border Background="Black" Margin="1" CornerRadius="3"/&gt;
                      &lt;Border Margin="2" CornerRadius="3"&gt;
                          &lt;Border.Background&gt;
                              &lt;LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0"&gt;
                                  &lt;GradientStop Color="#0099B9D1" Offset="0"/&gt;
                                  &lt;GradientStop Color="#FF99B9D1" Offset="1"/&gt;
                                  &lt;GradientStop Color="#B299B9D1" Offset="0.054"/&gt;
                              &lt;/LinearGradientBrush&gt;
                          &lt;/Border.Background&gt;
                      &lt;/Border&gt;
                      &lt;Border Margin="2" CornerRadius="3" Opacity="0.3"&gt;
                          &lt;Border.Background&gt;
                              &lt;LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0"&gt;
                                  &lt;LinearGradientBrush.RelativeTransform&gt;
                                      &lt;TransformGroup&gt;
                                          &lt;ScaleTransform CenterY="0.5" CenterX="0.5"/&gt;
                                          &lt;SkewTransform CenterY="0.5" CenterX="0.5"/&gt;
                                          &lt;RotateTransform Angle="90" CenterY="0.5" CenterX="0.5"/&gt;
                                          &lt;TranslateTransform/&gt;
                                      &lt;/TransformGroup&gt;
                                  &lt;/LinearGradientBrush.RelativeTransform&gt;
                                  &lt;GradientStop Color="Black" Offset="0"/&gt;
                                  &lt;GradientStop Color="Black" Offset="1"/&gt;
                                  &lt;GradientStop Color="#00090909" Offset="0.022"/&gt;
                                  &lt;GradientStop Color="#00000000" Offset="0.99"/&gt;
                                  &lt;GradientStop Color="#45060606" Offset="0.001"/&gt;
                              &lt;/LinearGradientBrush&gt;
                          &lt;/Border.Background&gt;&lt;/Border&gt;
  
                      &lt;ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/&gt;
                      &lt;/Grid&gt;
  
  
                  &lt;ControlTemplate.Triggers&gt;
                      &lt;Trigger Property="IsKeyboardFocused" Value="true"&gt;
  
                      &lt;/Trigger&gt;
                      &lt;Trigger Property="IsChecked" Value="true"&gt;
  
                      &lt;/Trigger&gt;
                      &lt;Trigger Property="IsEnabled" Value="false"&gt;
                          &lt;Setter Property="Foreground" Value="#ADADAD"/&gt;
                      &lt;/Trigger&gt;
                  &lt;/ControlTemplate.Triggers&gt;
              &lt;/ControlTemplate&gt;
          &lt;/Setter.Value&gt;
      &lt;/Setter&gt;
  &lt;/Style&gt;
  </code></pre>