Please refer to the attached screenshot and sample project. Workaround: call the RadForm.EndInit method before showing the form.
Workaround: set the RadRibbonFormBehavior1.AllowTheming property of the form to false public class RadForm1 { public RadForm1() { InitializeComponent(); this.RadRibbonFormBehavior1.AllowTheming = false; } }
VS 2022, Telerik 2022.2.510, NET 6.0 (sample app is attached)
1. Creating sample Telerik WinForms App.
2. Add a RadTextBox
3. Load Event with code
radTextBox1.Text = this.Size.ToString();
4. Run the App
5. Close the App
6. Move the RadTextBox Control at design time.
In design, the height of the form is 2 pixels taller.
Run these steps in a loop. After a few hours of work, the form exceeds the size of the screen.
1. Create a new Form that inherits from RadForm and add some rad controls. 2. Checkin the file in your source control system 3. Open the form in design time will cause checkout
Hi,
I am working on making our Winforms UI projects DPI aware to clean up fuzzy text in Windows 10.
I'm having an odd issue with some layouts. In one example, we have a simple form dialog that will grow with a label inside (similar to a windows message box). THe label is autosizing itself and has a minimum and maximum size set. This dialog is working fine without the DPI awareness, however, after enabling, the RadForm resizes to some strange size. I tried to investigate and it seems that the label is resizing to some large size and not respecting it's maximums (though this doesn't show when rendering as I've switched off the borders).
The label is resizing the form via anchors. I think probably there is a better way at layout here, but I'm wondering if the wild resizing may be considered a bug.
See images below.
I've also attached a project that reproduces this issue.
Dear support,
i have a RadForm and custom theme.
To reproduce the problem:
1. Configure 2. montior to have 200% Scale (Monitor2).
2. Start the solution on your main Monitor1 (with 100% Scale)
3. Click on button "radbutton1".
4. Move the shown RadForm1 from Monitor1 to Monitor2 and release it. The form will scale automatically.
5. Now move the RadForm1 back to the main Monitor1
Now you can see the effect from Form.png.
What is causing it and how to remove it?
The problem has some connection with the Anchor options from radButton1 and radButton2.
If i set them to "Top, Left", then the effect does not appear, but this way i have to set their location manually, or is there other option?
Regards,
Stoyan
To reproduce: Add a RadForm and at design time in the Properties section of Visual Studio try to customize some properties of the RadForm >> FormElement >> TitleBar, e.g. Padding, ForeColor. You will notice that even though you save the changes, they are not serialized. Thus, when you run the application, none of the changes are applied. Workaround: set the changes programmatically at run time.
To reproduce: - Set the StartPosition to CenterScreen - Show the form on a HDPI monitor Workaround: var form = new RadForm(); float dpiX, dpiY; Graphics graphics = this.CreateGraphics(); dpiX = graphics.DpiX /100; dpiY = graphics.DpiY /100; form.StartPosition = FormStartPosition.Manual; var monSize = Screen.FromControl(this).Bounds; var centerX = (monSize.Width / 2) - (form.DesktopBounds.Width * dpiX / 2); var centerY = (monSize.Height / 2) - (form.DesktopBounds.Height * dpiY/ 2); form.Location = new Point((int)centerX,(int) centerY); form.Show();
To reproduce: run the sample project. It ends up leaving significant blank space on the right and the bottom, whereas the normal MS Form does NOT do this and works right. Workaround: in the Load event you can adjust the size with 10/15 px by setting the MaximumSize: private void Form1_Load(object sender, EventArgs e) { this.MaximumSize = new Size(this.Size.Width - 15, this.Size.Height - 10); }