On Windwos XP , Windows Vista, Windows 7 the RadForm/ShapedForm hides the taskbar when it is set to Auto-Hide. When you try to show the taskbar it appears behind (under) the RadForm instead of infront (over) it.
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
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();
Setting the RightToLeftLayout to true together with RightToLeft = Yes, cuts off the form
1. Create RadRibbonForm and add code to start maximized 2. Add status strip with some items on the ribbon form 3. in the form constructor create a MDI child form, set it to start maximized and show it 4. The result is that there is gap between the child form and the status strip Workaround: protected override void OnShown(EventArgs e) { base.OnShown(e); this.WindowState = FormWindowState.Minimized; this.WindowState = FormWindowState.Maximized; }
Workaround: set the RadRibbonFormBehavior1.AllowTheming property of the form to false public class RadForm1 { public RadForm1() { InitializeComponent(); this.RadRibbonFormBehavior1.AllowTheming = false; } }
When the RadForm is used as MDI Child hosted by RadDock, the rendering of the form is not appropriate.
How to reproduce: set the Size property of the form in the designer of Visual Studio, pay attention to the serialized ClientSize value. Run the form and check the ClientSize, it has increased Workaround: public partial class Form2 : RadForm { public Form2() { InitializeComponent(); Padding p = TelerikDpiHelper.ScalePadding(this.FormBehavior.ClientMargin, new SizeF(1f / this.RootElement.DpiScaleFactor.Width, 1f / this.RootElement.DpiScaleFactor.Height)); this.MaximumSize = new Size(this.Size.Width - p.Horizontal, this.Size.Height - p.Vertical- this.FormBehavior.ClientMargin.Bottom + this.FormElement.TitleBar.Size.Height); } protected override void OnShown(EventArgs e) { base.OnShown(e); this.MaximumSize = new Size(0, 0); } }
To reproduce: public partial class RadRibbonForm1 : Telerik.WinControls.UI.RadRibbonForm { public RadRibbonForm1() { InitializeComponent(); this.AllowAero = true; this.RibbonBar.QuickAccessToolbarBelowRibbon = false; } } Note: the system buttons not always handle the mouse click. Workaround: set AllowAero to false OR RibbonBar.QuickAccessToolbarBelowRibbon to true.
To reproduce: RadForm form = new RadForm(); form.WindowState = FormWindowState.Maximized; form.Text = string.Format("Child {0}", MdiChildren.Length + 1); form.MdiParent = this; form.Show(); Hover the Form's title bar the tooltip should start flashing/blinking
To reproduce: - Add four buttons to a RadForm - On each button click use ThemeResolutionService to change the theme => the form size increases in height Workaround: Set the MaximumSize of the form to the current form size prior changing the theme and then remove this setting: private void radButton1_Click(object sender, EventArgs e) { this.MaximumSize = this.Size; ; ThemeResolutionService.ApplicationThemeName = "Office2010Blue"; this.MaximumSize = Size.Empty; }
To reproduce: 1. Drop a RadGridView and RadButton on Rad Form. 2. Set gris Anchor property to Top-Right-Bottom-Left and the buttons Anchor property to Right-Bottom. 3. Make sure that the RadForm's size is exactly as your desktop resolution(e.g. my 'RadForm' size and desktop resolution are 1920x1080). 4. Change its 'AutoScaleMode' property's value to 'Font'. 5. Build project. 6. Copy the resulted executable on your desktop and name it 'RadControlsWinFormsApp_Font' 7. Select again the RadForm. 8. Change its 'AutoScaleMode' property's value to 'DPI' 9. Build project. 10. Copy the resulted executable on your desktop and name it 'RadControlsWinFormsApp_DPI' 11. Select again the RadForm 12. Change its 'AutoScaleMode' property's value to 'Inherit' 13. Build project 14. Copy the resulted executable on your desktop and name it 'RadControlsWinFormsApp_Inherit' 15. Change your desktop resolution to a lower one (e.g. I've change it from 1920x1080 to 1600x900) 16. 'Auto-Hide' the Window's taskbar 17. Run the executables and see the results: 17.1 In case of 'RadControlsWinFormsApp_Font' application, you should see that the 'RadGridView' control gets truncated + the lower right 'RadButton' is not visible anymore 17.2 In case of 'RadControlsWinFormsApp_DPI' application, you should see that the 'RadGridView' control gets truncated + the lower right 'RadButton' is not visible anymore 17.3 In case of 'RadControlsWinFormsApp_Inherit' application, you should see the controls on the form as you initially placed them. Also this issue appears on 'Windows XP SP3 x86' and also on 'Windows 7 SP1 x64' . Workaround: - Set AutoScaleMode property to None or Inherit.
The size of RadForm under Windows XP is incorrect when its initial state as MDI child is Maximized and after that the state is changed to Normal. Workaround: Imports Telerik.WinControls.UI Public Class BaseRadForm Inherits RadForm Private Shared LastWindowState As FormWindowState = FormWindowState.Normal Private Shared suspendClientSizeChangedFlag As Boolean = False Protected Overrides Sub OnResizeBegin(ByVal e As System.EventArgs) Me.MaximumSize = New Size(0, 0) MyBase.OnResizeBegin(e) End Sub Protected Overrides Sub OnActivated(ByVal e As System.EventArgs) Me.MaximumSize = New Size(0, 0) MyBase.OnActivated(e) End Sub Protected Overrides Sub OnDeactivate(ByVal e As System.EventArgs) Me.MaximumSize = New Size(0, 0) MyBase.OnDeactivate(e) End Sub Protected Overrides Sub OnClientSizeChanged(ByVal e As System.EventArgs) Dim osInfo As System.OperatingSystem = System.Environment.OSVersion If (suspendClientSizeChangedFlag OrElse osInfo.Version.Major >= 6) Then Return End If If Not LastWindowState.Equals(Me.WindowState) Then LastWindowState = Me.WindowState If Me.WindowState.Equals(FormWindowState.Normal) Then suspendClientSizeChangedFlag = True Me.MaximumSize = New Size(500, 500) suspendClientSizeChangedFlag = False ElseIf Me.WindowState.Equals(FormWindowState.Maximized) Then Me.MaximumSize = New Size(0, 0) End If Else Me.MaximumSize = New Size(0, 0) End If MyBase.OnClientSizeChanged(e) End Sub End Class
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.
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.
RadForm has AllowTheming property which enables/disables the aero effects of RadForm and when you set it to false our theming mechanism is disabled. Add a property,e.g. ThemeResolutionService.ApplicationAllowTheming, which will control the AllowTheming of all forms in the application. In addition, RadForm should have a new property,e.g. EnableApplicationAllowTheming, which will control whether the respective form should respect the global property or not. Case 1: ThemeResolutionService.ApplicationAllowTheming = true RadForm1.EnableApplicationAllowTheming=true //this property is set to true; this indicates that the local AllowTheming property WON'T be respected and the global property ApplicationAllowTheming takes effect RadForm1.AllowTheming=false RadForm1 has theming. RadForm2.EnableApplicationAllowTheming=false //this property is set to false; this indicates that the local AllowTheming WILL be respected and the global property ApplicationAllowTheming DOESN'T take effect RadForm2.AllowTheming=false RadForm2 doesn't have theming. Case 2: ThemeResolutionService.ApplicationAllowTheming = false RadForm1.EnableApplicationAllowTheming=true //this property is set to true; this indicates that the local AllowTheming property WON'T be respected and the global property ApplicationAllowTheming takes effect RadForm1.AllowTheming=true RadForm1 doesn't have theming. RadForm2.EnableApplicationAllowTheming=false //this property is set to false; this indicates that the local AllowTheming WILL be respected and the global property ApplicationAllowTheming DOESN'T take effect RadForm2.AllowTheming=true RadForm2 has theming. Note: the same logic is implemented for the ThemeResolutionService.ApplicationThemeName: http://docs.telerik.com/devtools/winforms/themes/using-a-default-theme-for-the-entire-application
The issue can be reproduced by creating a form with a width of 1200 pixels in an application that is DPI aware. Then the project is run on a tablet with low resolution and an increased DPI, e.g. 1024 x 768 and scaling 120%. Workaround: Public Class RadForm1 Sub New() InitializeComponent() Dim g = Me.CreateGraphics() Dim scale = 96.0 / g.DpiX Me.Size = New Size(scale * Me.ClientSize.Width, scale * Me.ClientSize.Height) g.Dispose() Me.WindowState = FormWindowState.Normal End Sub End Class