In this particular case, we have custom RadButtonElements placed in the title bar of the form. We have subscribed to the click event on each button. In the click event handlers, we are showing file dialogs. When clicking one time to show a dialog and the mouse leaves the title bar bounds, this triggers the click event twice, thus opening another dialog.
As a workaround, we could use the MouseDown event instead or raise a flag in the click event handler.
To reproduce, use the following code and minimize the child form:
public partial class RadForm1 : Telerik.WinControls.UI.RadForm
{
public RadForm1()
{
InitializeComponent();
this.IsMdiContainer = true;
RadForm form = new RadForm();
form.Text = "MDI Child";
form.MdiParent = this;
form.MinimumSize = new Size(800,600);
form.Show();
}
}
To reproduce:
1. Create a new .NET 7 project and add a RadForm to it with a single control (e.g. RadButton).
2. Open the designer and have a look at the form's Size.
3. Move the button and save the changes
4. Close the designer and open it again.
Expected result: the RadForm's Size is unchanged
Actual result: the RadForm gets smaller, its height is reduced.
Follow the steps which are illustrated in the gif file:
1. Create new .NetFrameWork Telerik WinForm project
2. Set the MinSize of the RadForm1 to 300, 300
3. Set the MaxDize of the RadForm1 to 600, 600
4. Save the Form
5. Close the form
6. Build the project
7. Add new Telerik form, inherit from RadFrom1 via the Add New Item form and picking Inherited Form (Windows Forms). When prompted, pick RadForm1.
8. Resize the new form
9. Save and Close the form.
10. Open RadForm1
11. Reset the Max Size
12. Save and Close RadForm1
13. Rebuild the project
14. Open the inherited form
Workaround: instead of adding an Inherited Form, add a Telerik RadForm. Then, change it to inherit from RadForm1:
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.
Updating from Version 2022.1.118 to 2022.1.222 breaks high dpi layout for existing dialogs at 150% DPI scaling:
Expected:
Actual:
Workaround: Use the MS Form
To reproduce:
Workaround:
In the OnLoad method of RadForm do through all nested RadControls inside the UserControl and downscale them to the same DPI as the RadForm.
To reproduce:
1. Use the 2020.3.1020 Telerik version
2. Show RadForm and set MinimumSize property
3. Double Click the Title Bar to maximize the form or click the Maximize button
4. Double Click the Title Bar again and see that no border is shown.
Thanks
Please run the sample project on 100% and 150% DPI scaling. You will notice that with 100% the shown form is centered to its parent, but with 150% it is shifted: