Hi, I have a C# user control comprising three text boxes and some labels. It is designed to be laid out in either landscape fashion with the three text boxes and their labels laid out horizontally left-right next to each other, or in portrait mode with them above each other vertically. So I have a SizeChanged EventHandler which works well at run time - i.e. you can resize the form containing the user control and if the width is larger than the height it lays out horizontally, otherwise it lays out vertically. This works very well.
Now when I place the user control in VS Studio designer (Community 2015 edition) it does not initially lay out according to its resized dimensions. But if I subsequently resize it in VS designer, it does - obviously the SizeChanged EventHandler is being fired and correctly behaves. If I save that form and re-open it, it does not layout correctly again.
What do I have to do to get it to layout correctly when it is first placed or re-opened in VS designer?
What I have tried:
I have tried adding a call to the SizeChanged EventHandler in the User Control's Load Event handler and also in the host Form's Load Event handler but that doesn't solve the problem.