How i can minimize window from page?
I tried to do this, but it crashes the program.
private void minimizeBtn_Click(object sender, RoutedEventArgs e)
        {
           (this.Parent as Window).WindowState = WindowState.Minimized;
        }
How i can minimize window from page?
I tried to do this, but it crashes the program.
private void minimizeBtn_Click(object sender, RoutedEventArgs e)
        {
           (this.Parent as Window).WindowState = WindowState.Minimized;
        }
You can minimize the current window via Page as:
private void minimizeBtn_Click(object sender, RoutedEventArgs e)
{
    Window.GetWindow(this).WindowState = WindowState.Minimized;
}