Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Here's an example on how to achieve this: </p> <p></p> <pre><code> &lt;Grid DockPanel.Dock="Right" HorizontalAlignment="Right"&gt; &lt;StackPanel Orientation="Horizontal" HorizontalAlignment="Right" VerticalAlignment="Center"&gt; &lt;Button x:Name="MinimizeButton" KeyboardNavigation.IsTabStop="False" Click="MinimizeWindow" Style="{StaticResource MinimizeButton}" Template="{StaticResource MinimizeButtonControlTemplate}" /&gt; &lt;Button x:Name="MaximizeButton" KeyboardNavigation.IsTabStop="False" Click="MaximizeClick" Style="{DynamicResource MaximizeButton}" Template="{DynamicResource MaximizeButtonControlTemplate}" /&gt; &lt;Button x:Name="CloseButton" KeyboardNavigation.IsTabStop="False" Command="{Binding ApplicationCommands.Close}" Style="{DynamicResource CloseButton}" Template="{DynamicResource CloseButtonControlTemplate}"/&gt; &lt;/StackPanel&gt; &lt;/Grid&gt; &lt;/DockPanel&gt; </code></pre> <p>Handle Click Events in the code-behind.</p> <p>For MouseDown -</p> <pre><code>App.Current.MainWindow.DragMove(); </code></pre> <p>For Minimize Button -</p> <pre><code>App.Current.MainWindow.WindowState = WindowState.Minimized; </code></pre> <p>For DoubleClick and MaximizeClick</p> <pre><code> if (App.Current.MainWindow.WindowState == WindowState.Maximized) { App.Current.MainWindow.WindowState = WindowState.Normal; } else if (App.Current.MainWindow.WindowState == WindowState.Normal) { App.Current.MainWindow.WindowState = WindowState.Maximized; } </code></pre> <p>I hope this helps.</p> <p>-Sushant</p>
    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.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. 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