title: WPF how to get maximize/minimize button icon - Custom title bar
body: <p>I'm trying to create a custom title bar for my application. I have no idea how to add a the windows maximize or minimize icon to the button. I want my icons o look similar to this</p>
  
  <p><a href="https://i.stack.imgur.com/iPSfN.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/iPSfN.png" alt="Maximize/Minimize example"></a></p>
  
  <p>Here is my XAML for my buttons</p>
  
  <pre><code>            &lt;Button Command="{x:Static SystemCommands.MaximizeWindowCommand}" Content="+" Canvas.Left="1020" Height="30" Width="30"&gt;
              &lt;Button.Style&gt;
                  &lt;Style TargetType="{x:Type Button}"&gt;
                      &lt;Setter Property="Background" Value="Black"/&gt;
                      &lt;Setter Property="TextBlock.Foreground" Value="White"/&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="#403c47"/&gt;
                          &lt;/Trigger&gt;
                      &lt;/Style.Triggers&gt;
                  &lt;/Style&gt;
              &lt;/Button.Style&gt;
          &lt;/Button&gt;
          &lt;Button Command="{x:Static SystemCommands.MinimizeWindowCommand}" Content="" Canvas.Left="990" Height="30" Width="30" &gt;
              &lt;Button.Style&gt;
                  &lt;Style TargetType="{x:Type Button}"&gt;
                      &lt;Setter Property="Background" Value="Black"/&gt;
                      &lt;Setter Property="TextBlock.Foreground" Value="White"/&gt;
                      &lt;Setter Property="FontSize" Value="24"/&gt;
                      &lt;Setter Property="TextBlock.LineHeight" Value="5"/&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="#403c47"/&gt;
                          &lt;/Trigger&gt;
                      &lt;/Style.Triggers&gt;
                  &lt;/Style&gt;
              &lt;/Button.Style&gt;
          &lt;/Button&gt;
  </code></pre>
  
  <p>Any assistance is appreciated :)</p>