Ashish

Ashish

  • 2.1k
  • 1
  • 4k

How to maximize the main window (including its stackPanel usercontrol) as per screen, accordingly the loaded control sizes should also increase.

Jun 28 2012 4:19 AM
Hi there,
I have developed a WPF application. There is a main window form with header menu items, stackPanel as body and footer. The main window menu items clickevent opens the respective user control and put it as child to stackpanel.
The main window opens with fixed height width (stack panel in main also has fixed height initially and windowsStyle=none).
Problem - On maximize button click I need to maximize the main window (including its stackPanel usercontrol) as per screen, accordingly the loaded control sizes should also increase.
I have already tried [DllImport("user32.dll")] > WindowInteropHelper class but it doesn't help.
 
Please help me out to resolve this.

Regards,
Ashish

Answers (1)