Hi,After upgrading from 18.2 to 19.1all of the UltraCheckBoxes and Ultra radio button lists are very tiny.Everything else looks fine.Regular System.Windows.Forms.CheckBox is also fine.
I use a 4k monitor for design and viewing.Visual Studio 2019, windows 10 latest.
It looked fine before this upgrade.Any suggestions, as have thousands of these in various forms.(this is a large app with hundreds of screens)For the checkboxes i can change these over to regular windows checkboxes by editing directly in the designer file for win formsNot so easy for radio button lists or ultra radio buttons in group managers.The text size is fine, just the size of checkboxes and radio buttons.Thanks,Michael
Hm. I'm still not clear on how the checkboxes could be scaling BEFORE the recent CTP. Or why they would not be scaled in 19.1. We don't scale any images - stretching an image is a bad idea, since they tend to get blurry. The only thing we are doing is resizing elements and drawing glyphs in a scaleable way when possible. Any calculations we do for scaling are done based on hard-coded or system values. So, for example, the size of a Checkbox glyph used to be hard-coded to 13x13 which is the default size at 100% DPI. It's not based on the initial size of the elements or the controls. So I don't think the fact that you are developing on a high-definition system could cause these issues.
I suppose there might be an error in the scaling for the close button on the tabs. But frankly, the size of the close button looks correct to me in your screen shots. The problem there seems to be that the text is too small. So the button image is getting scaled but the text is not. As I mentioned, MS handles text by setting the Font on the form. So if you are setting a font on the Tab control, then that will override the form's setting and it won't scale properly.
To answer your question about the setting the checkbox or radiobutton glyphs at run-time, the answer is yes. What you do is create a new instance of Infragistics.Win.CheckBoxImageGlyphInfo. There's a constructor that takes in the individual images for each possible state. And similarly, there's a RadioButtonImageGlyphInfo class. The first param of the constructor is the glyph size.
Then you can apply them to any control that has a property that takes a GlyphInfoBase. For example, on UltraCheckEditor, that would be the GlyphInfo property on the control.
If you want to apply the glyphs to the entire application at once and not on each control, then you would have to use AppStylist - which is a bit tricky to do at run-time, but it can be done if applying the glyph on each control is too burdensome.
Hi Mike,I was able to verify everything in a second c# win forms project.The screen shots were from a vb.net win forms project.Again, when i apply the MaxDpiAwareness it fixes check boxes and radio button sizes, but at least in my view, makes the 'X' for the close button on mdi tabs way too large, and different that the approach when not scaled at all which is uniform with the text size.One thing to keep in mind is that I am designing on a 4K monitor at 192 dpi, so for me, when viewing on another 4K monitor there is no or little scalling, and win-forms scaling happens for smaller resolutions like 1920x1080. I use a 4K first approach, and use icons, etc, that look good at those resolutions. I then resize the images in buttons and labels at runtime if needed.My guess is that this is the reason it gets tiny in size, as there probably was an assumption that initially set at 92dpi ???All of my forms and user controls use AutoScaleMode: FontIs there some way that i can set the Glyphinfo for a radio button or check box at run time? If so, and keep it looking sharp for 4 k, then i can do scale up, or even way better, if i can get at the 'X' close button on the tab names for UltraMdiTabManager, and scale that down in size.One thing i will try is to run a Windows Scale call on an ultra check box or radio button list?In my code i am iterating through controls and fixing anything that winforms did not get at when scaling, i Also set the image size for the detail view of an ultralistview control when scaled down. This makes it look better as well in lower resolutions (for me these images are solid colors, and they draw fast (i.e., can load 20k items in an ultra list view in a second or so).I do not handle draw events, rather instantiate my scaling helper just after InitializeComponants in the New Ctor .I also have a ForceScale method which i use for some dialogs to keep them from getting blown up in size and call first thing in Load Event Handler.Will share it here tomorrow, after adding a test for the force scale method to it to make sure i do not apply this if a future version of winforms scales dialogs correctly.Thanks, and let me know if anything else i can supply, or any suggestionsMichael
Hi Michael,
So, I seem to be getting more confused here rather than less.
It's good to know that setting the MaxDpiAwareness fixes the CheckBox and RadioButton sizes. But I'm still puzzled as they how they could possibly have been sizing correctly in previous versions like 18.2. Unless you were using some kind of workaround where you were drawing them yourself, they would have been too small. Which is why the CTP fixes them. But I can't see any way they could possibly have worked before or why they would have changed now when MaxDpiAwareness is turned off.
Michael said:Using Infragistics.Win.DpiUtilities.MaxInfragisticsDpiAwareness = Infragistics.Win.InfragisticsDpiAwareness.PerMonitorDpiAware;Fixes things perfectly for checkboxes and radio button lists, but introduces other factors, as per screen shots.
I expect that there will be some issues when using the new DPI Scaling functionality - it's a CTP and it's absolutely nowhere near finished. But I'm a little confused about what your screen shots are meant to be showing and what the problems are.
It seems like you are pointing to the radio buttons to show that they are fixed when MaxDpiAwareness is set. So that's good.
The close button on the tabs is correct - previously, it was too small and not scaling and now it is scaling. So that's the intended behavior.
I'm not sure what your third arrow is point to or what that's supposed to indicate. I guess that's an UltraWinGrid control? And I can see that the row height has increased, but the size of the text has not. Is that the issue you are pointing out? Our Dpi Scaling functionality doesn't do any scaling of the fonts. MS already takes care of that in their own way by scaling the form's Font. This means anything that is using the default font from the form will draw bigger text. But if you are explicitly setting a font on an individual control or appearance, then it's up to you to scale it. Not much we can do there.
The row height is probably increasing in order to account for buttons in the cells. We scale up the height of any buttons so they appear scaled on a high-def monitor. So that might explain why the row height is getting bigger, but the text is not.
Hi, I have 'Enable XP Visual Styles' enables in project settingsI turn off 'Use OS themes' for some elements like ultrabuttons to style them.I tried toggling 'Use OS themes' on and off for the ultra mdi tab manager with no effect , i.e., the screen shots loaded above remain the same.Will create a sample project to try to duplicate things,and will include an ultraTabMdiManager, ultraListView, buttons, labels, etc.Give me a couple days for that, as soon as have the bandwidth.
Thanks for your quick response.Using Infragistics.Win.DpiUtilities.MaxInfragisticsDpiAwareness = Infragistics.Win.InfragisticsDpiAwareness.PerMonitorDpiAware;Fixes things perfectly for checkboxes and radio button lists, but introduces other factors, as per screen shots.This is using .Net Framework 4.7.2 (switched over about a month ago from 4.6.1)I do have high DPI support turned on in app.config and manifest files, windows 10 recognition, etc,I use 4K consistantly for design work within visual studio, and use the autoscale=font (not dpi) on all forms.Have had high dpi support turned on for several years in manifest files, and it works except for a few areas which had to fix with some helpers i wrote (image sizing inside of buttons, labels, and dialog box sizes)When i switched over to 4.7.2 i turned off these helpers, and works.Then upgraded from 18.2 to 19.1 a couple days ago.All of this is staying on 4K for display as well (once that is good, then will look at other resolutions).I will put together further info as i continue to research and try different things on my side.Thanks again for your quick response and suggestions.