Click here to Skip to main content
15,908,768 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I made window design same as Mdi container in windows form using ITabbedMDI interface. So how can I change height and width of child window and keep same as parent window if parent window is maximized. I had made child window as user control, Thanks.
Posted

1 solution

You can use binding for this. Like in this example:
C#
var height = new Binding("ActualHeight") { Source = MdiContainer };
var width = new Binding("ActualWidth") {Source = MdiContainer};
child.SetBinding(FrameworkElement.WidthProperty, width);
child.SetBinding(FrameworkElement.HeightProperty, height);
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900