Reputation: 1
I have a wpf form which has one main window. when i click a button in main window it i will show a child window. I tried to restore the child window but couldn't. how to restore while it is minimized in system tray?
Upvotes: 0
Views: 503
Reputation: 1578
Something like this should work
if (this.MainWindow.WindowState == WindowState.Minimized)
{
this.MainWindow.WindowState = WindowState.Normal;
}
//bring window to front of all windows
this.MainWindow.Activate();
this.MainWindow should be the reference to the window you want to maximize or bring to normal state.
Regards,
Upvotes: 2