Hello,
I am working on a major application composed of more that a hundred controls and forms. Now we are thinking about providing multiple theme support to our application.
Now the thing is that each theme might have a different font and font size and if the font size is too large we get an issue of overlapping of controls(provided that auto size property is set).
So my question is if there is a way to automatically adjust the spaces between different control so that the form adjusts automatically to a font change? and if we can then how?? or is there another way to achieve something like this?
I want the form to retain its basic look and feel irrespective of the font used. Your suggestions are welcome and appreciated
Regards
Ishan Gandhi
Hello Sumit,
Thank you for contacting Infragistics Support.
When you change the font size of the form it is automatically resized itself together with its child controls. More information about Windows Forms automatic scaling you may find in this MSDN article http://msdn.microsoft.com/en-us/library/ms229605(v=vs.110).aspx
Please note if you set the AutoSize property of any control to true it will, by default, resize its height in order to fit its content. My suggestion is to set AutoSize property of your controls to false.
Please check attached sample solution where you may change the form’s font size. After each change of the font the form resize accordingly.
Please let me know if this is what you are looking for or if I am missing something.
Hey Milko,
Yeah this method works. But I am still not able to change the font size of forms using "Dynamic Appstylist" which is implemented into my application. For these forms there is no role selection popup for "inbox form". It looks like the stylist does not acknowledge the presence of a form. Also the forms have an ultraformmanger to theme the non-client area. I am attaching a screenshot to give you more clarity.
I am just checking about the progress of this issue. Let me know if you need my further assistance on it.
Thank you for using Infragistics Components.
Thank you for your feedback.
In order to be able to apply styles through AppStylist on inbox controls you need to add InboxControlStyler component to your form. Please check my revised sample solution with InboxControlStyler component added. If you change the Font Size of Inbox Form it will scale the entire form. More about InboxControlStyler you may find by following the next link http://help.infragistics.com/Doc/WinForms/current/CLR4.0/?page=Win_InboxControlStyler_About_InboxControlStyler.html