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: 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); }
How to reproduce: add a RadRibbonForm and set its MaximizeBox, MinimizeBox properties to false. Set the HelpButton property of the form to true and change its Icon. You will notice that the designer in Visual Studio has not updated. Workaround: use the element hierarchy editor and manually change the visibility of the elements.
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: - Hide the border and change the BackColor of the form. - Dock a MenuStrip to the top. - You will notice that there are 2 pixels on the left and right sides of the menu. Project is attached as well.
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); } }
How to reproduce: just create a RadForm, in the designer change its size and set its FormBorderStyle property to be None. When the form loads its size will be increased. Workaround: set its MaximumSize property this.MaximumSize = new Size(400, 80);
To reproduce: follow the steps from the attached gif file. Workaround: public RadForm1() { InitializeComponent(); ((RadRibbonFormBehavior)this.FormBehavior).AllowTheming = false; }
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
Please refer to the attached screenshot and sample project. Workaround: call the RadForm.EndInit method before showing the form.
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.
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
To reproduce: Please refer to the attached screenshots and sample project: 1. Disable Aero 2. Change to Windows Classic 3. Run the provided project Workaround: change to Windows 7 aero Theme with disabled transparency.
The attached video shows how you can reproduce this. The issue is easily reproducible on a remote Windows 7 machine.
To reproduce: public Form1() { InitializeComponent(); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle; } Although the user is not allowed to resize the form from the form's borders, it is possible to do it by the context menu. Workaround: [DllImport("user32.dll")] static extern bool EnableMenuItem(IntPtr hMenu, uint uIDEnableItem, uint uEnable); internal const UInt32 MF_DISABLED = 0x00000002; internal const UInt32 SC_SIZE = 0xF000; internal const UInt32 WM_INITMENUPOPUP = 0x0117; protected override void WndProc(ref Message m) { if (m.Msg == WM_INITMENUPOPUP && (((int)m.LParam & 0x10000) != 0)) { EnableMenuItem(m.WParam, SC_SIZE, MF_DISABLED); } base.WndProc(ref m); }
To reproduce: Use the following method to add a form with a textbox to a panel: Private Sub AddPage(ByRef f As Form) Try pnlScreenContainer.SuspendUpdate() f.TopLevel = False f.Visible = False f.Dock = DockStyle.Fill pnlScreenContainer.Controls.Add(f) f.Visible = True f.BringToFront() f.FormBorderStyle = Windows.Forms.FormBorderStyle.None f.Show() f.Activate() Catch End Try pnlScreenContainer.ResumeUpdate() End Sub Workaround: - Use RadTextBoxControl instead.
To reproduce: add a RadForm and start the application. Workaround: public partial class Form1 : RadForm { public Form1() { InitializeComponent(); } protected override void OnLoad(Size desiredSize) { this.ElementTree.InitializeRootElement(); this.RootElement.ApplyShapeToControl = false; base.OnLoad(desiredSize); } protected override void OnLoad(EventArgs e) { base.OnLoad(e); this.RootElement.ApplyShapeToControl = true; } }