I am trying to resize Infragistics win controls as the size of the parent form, container, or display resolution changes. Anchor and dock property resolves this issue to a certain level but I need to adjust not only width/height but also font size for all controls and column with/row height for grids. I am wondering if there is a infratistics control or easy way to accomplish this mission. Or, should I purchase a thirty party control? Any recommendations will be appreciated.Thanks.Sam
Hi Sam,
Have you ever worked with the Infragistics Application Styling framework for Windows Forms? The tool you can use to help you with this is called AppStylist (launched from your start menu > Infragistics> Windows Forms folder).
App Stylist allows you to create your own themes for your Infragistics powered apps. Aside from the appearance configuration you can set up for all controls, the Font size is also configurable for all aspects of the theme. This also holds true for the font size of all the different control elements and their associated states too.
You can create a theme (or update your existing theme, or choose one our existing themes) and then make separate copies of the theme - each copy would represent your theme at a different resolution range. Each theme would only be different by the font sizes for the various controls. Whenever the resolution changes, you will just load up the appropriate theme by using the one line of code: StyleManager.Load(theTheme); from anywhere in your app. This will cause your entire app to be restyled at runtime.
Now, for column widths, that will be a little tricky, but it would be up to you to code that functionality. One suggestion that I can think of is to subclass the WinGrid control and place the column resizing logic in the subclassed control's code. You can then expose the invocation of the resize logic through a method which can then be called from the context of your application when the resolution changes.