I have a System.Windows.Forms.UserControl which performs a this.ResumeLayout(false) at the end of the method InitializeComponent.
I would like to know if there is any way or event to handle just before the code for the ResumeLayout is executed.
I need to get the value for the property this.AutoScaleFactor just before ResumeLayout is executed. If that possible? If so, how.
It is so difficult to get around this because the code in InitializeComponent method is automatically generated by Visual Studio and ResumeLayout is being put there automatically as the last líne of the InitializeComponent. So I am also wondering if it is possible to tell Visual Studio to not add ResumeLayout(false) at the end of this method so I can call it manually later outside the InitializeComponent just after I get the scaling factor through this.AutoScaleFactor. For example in the constructor of the UserControl do:
InitializeComponent();
var scaleFactor = this.AutoScaleFactor;
this.ResumeLayout(false);