Hi
You can use the following event in the XAML:
PreviewMouseDoubleClick="Window_PreviewMouseDoubleClick"
You don't have to put it on the "Window". You can create your own title bar in the top and add the event to that control instead. Because adding it to the Window make it work all over the window.
Then add the following code in the event:
private void Window_PreviewMouseDoubleClick(object sender, MouseButtonEventArgs e)
{
if (this.WindowState == System.Windows.WindowState.Maximized)
this.WindowState = System.Windows.WindowState.Minimized;
else
this.WindowState = System.Windows.WindowState.Maximized;
}
This method will maximize if not yet maximized, and minimize if maximized.
Hope it helped :-)