I want to implement double click event on Title bar for maximize and minimize the window
<Window
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xml:lang="en-US"
xmlns:abc="clr-namespace:abc"
xmlns:d="http://schemas.microsoft.com/expression/blend/2006"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
xmlns:local="clr-namespace:abc"
x:Class="abc.Window1"
x:Name="Window"
Title="Good People"
MinHeight="100"
MinWidth="200" AllowsTransparency="True" Background="Transparent" SizeChanged="Window_SizeChanged"
Height="600" Width="900" WindowStyle="None" Loaded="Window_Loaded" PreviewMouseMove="ResetCursor"
ResizeMode="NoResize" WindowStartupLocation="CenterScreen" Icon="/abc;component/aexe.ico" PreviewKeyDown="Window_PreviewKeyDown" MouseLeftButtonDown="Window_MouseDown">
<Border Name="windowborder1" BorderBrush="{DynamicResource MyDarkBlueSolidBrush}" Background="{DynamicResource TitleBorderBrush}" BorderThickness="1.5" CornerRadius="5">
<Border Name="windowborder" BorderBrush="{StaticResource TitleBorderBrush}" Background="{StaticResource TitleBorderBrush}" BorderThickness="2" CornerRadius="5" >
<Grid x:Name="LayoutRoot">
<Rectangle Fill="{StaticResource TitleBorderBrush}" Stroke="{x:Null}" VerticalAlignment="Top" Height="2.5" x:Name="top" PreviewMouseDown="Resize" MouseMove="DisplayResizeCursor" Margin="2.5,0,2.5,0"/>
<Rectangle Fill="{StaticResource TitleBorderBrush}" Stroke="{x:Null}" x:Name="bottom" Height="2.5" VerticalAlignment="Bottom" PreviewMouseDown="Resize" MouseMove="DisplayResizeCursor" Margin="2.5,0,2.5,0"/>
<Rectangle Fill="{StaticResource TitleBorderBrush}" Stroke="{x:Null}" HorizontalAlignment="Left" Margin="0,2.5,0,2.5" Width="2.5" x:Name="left" PreviewMouseDown="Resize" MouseMove="DisplayResizeCursor"/>
<Rectangle Fill="{StaticResource TitleBorderBrush}" Stroke="{x:Null}" Margin="0,2.5,0,2.5" Width="2.5" HorizontalAlignment="Right" x:Name="right" PreviewMouseDown="Resize" MouseMove="DisplayResizeCursor" />
<Rectangle Fill="{StaticResource TitleBorderBrush}" Stroke="{x:Null}" HorizontalAlignment="Left" VerticalAlignment="Bottom" Width="2.5" Height="2.5" x:Name="bottomLeft" PreviewMouseDown="Resize" MouseMove="DisplayResizeCursor"/>
<Rectangle Fill="{StaticResource TitleBorderBrush}" Stroke="{x:Null}" VerticalAlignment="Bottom" Height="2.5" Width="2.5" HorizontalAlignment="Right" x:Name="bottomRight" PreviewMouseDown="Resize" MouseMove="DisplayResizeCursor"/>
<Rectangle Fill="{StaticResource TitleBorderBrush}" Stroke="{x:Null}" HorizontalAlignment="Right" Width="2.5" Height="2.5" VerticalAlignment="Top" x:Name="topRight" PreviewMouseDown="Resize" MouseMove="DisplayResizeCursor"/>
<Rectangle Fill="{StaticResource TitleBorderBrush}" Stroke="{x:Null}" HorizontalAlignment="Left" Width="2.5" VerticalAlignment="Top" Height="3" x:Name="topLeft" PreviewMouseLeftButtonDown="Resize" MouseMove="DisplayResizeCursor"/>
<DockPanel Name="Maindocpanal" Background="{DynamicResource TitleBorderBrush}" Margin="2.5,2.5,2.5,2.5">
<Grid Height="auto" Name="gridTitle" Width="auto" DockPanel.Dock="Top" MouseLeftButtonDown="mouseLeftButtonDown" Margin="0,0,0,0">
<Grid Name="maxMinCloseGrid" Height="auto" Background="{DynamicResource TitleBorderBrush}"
ClipToBounds="False" Margin="0,0,0,0" IsHitTestVisible="True">
<Grid.ColumnDefinitions>
<ColumnDefinition Width=".300*" />
<ColumnDefinition Width=".700*" />
</Grid.ColumnDefinitions>
<Label Margin="105,5,0,1" Name="titleLabel" DockPanel.Dock="Top"
Background="Transparent" ClipToBounds="False" Foreground="{DynamicResource MyDarkBlueSolidBrush}" FontFamily="Tahoma"
Grid.Column="1" HorizontalAlignment="Left" Width="185" FontSize="14" FontStyle="Normal"
>abc
</Label>
<Button Name="closeButton" Margin="0,0,2,15" Click="closeButtonClick" Width="25" Height="20"
TextBlock.FontWeight="Bold" Background="Transparent" BorderBrush="Transparent" Foreground="{DynamicResource MyDarkBlueSolidBrush}"
HorizontalAlignment="Right" Grid.Column="1" BorderThickness="0" FontFamily="Webdings">
r
</Button>
<Button Name="maximizeButton" Margin="0,0,26,15" Click="maximizeButtonClick" TextBlock.FontWeight="Bold" Background="Transparent" BorderBrush="Transparent" Foreground="{DynamicResource MyDarkBlueSolidBrush}" Grid.Column="1" BorderThickness="0" Padding="0" Focusable="False" Width="25" Height="20" HorizontalAlignment="Right" VerticalAlignment="Center" Content="1" FontFamily="Webdings" FontWeight="Bold">
</Button>
<Button Name="minimizeButton" Margin="0,0,50,15" TextBlock.FontWeight="Bold" Foreground="{DynamicResource MyDarkBlueSolidBrush}"
Background="Transparent" BorderBrush="Transparent" BorderThickness="0" Width="25" Height="20" FontWeight="Bold"
HorizontalAlignment="Right" Click="minimizeButtonClick" Grid.Column="1" FontSize="11" Focusable="False" Content="0" FontFamily="Webdings">
</Button>
</Grid>
</DockPanel>
</Grid>
</Border>
</Border>
</Window>