To reproduce: public Form1() { InitializeComponent(); RadMessageBox.Instance.AutoSize = true; } private void radButton1_Click(object sender, EventArgs e) { string msg = string.Format("Test", (sender as RadButton).Name); RadMessageBox.Show(msg, "Error"); } Note that the size of RadMessageBox is adjusted automatically to display the whole content. Hence, it is not necessary to set the RadMessageBox.Instance.AutoSize property to true.
To reproduce: -Set RTL via the insane: RadMessageBox.Instance.RightToLeft = RightToLeft.Yes; - You will notice that layout is not changed when the messagebox is shown. Worlaround: - Use the RadMessageBox show method with the following parameters: RadMessageBox.Show(this, "test", "caption", MessageBoxButtons.OKCancel, icon, MessageBoxDefaultButton.Button1, RightToLeft.Yes);
RadMessageBox - has incorrect layouts when the message text is formatted with HTML like. Workaround: RadMessageBox.Show("Text"); RadMessageBox.Instance.Dispose(); If you are using themes, consider the following approach: RadMessageBox.SetThemeName("Windows7"); RadMessageBox.Show("This is some long text that sometimes does not wrap as it should."); var field = typeof(RadMessageBox).GetField("radMessageBoxForm", BindingFlags.NonPublic | BindingFlags.Static); field.SetValue(null, null);
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; } }
To reproduce: - Add RadMenu to a panel which is docked to the top. - Add an MDI child and maximize it. - You will notice that there is one more set of form buttons visible. Workaround: - Leave the menu outside of the panel.
To reproduce: - Set the MaximizedBounds property so the form takes the entire right part of the screen, the change the windows state at runtime: private void radButton1_Click(object sender, EventArgs e) { setFormMaximizedBounds(200); } private void radButton2_Click(object sender, EventArgs e) { setFormMaximizedBounds(-1); } private void setFormMaximizedBounds(int distance) { if (distance >= 0) { var ownerScreen = Screen.FromControl(this); var workingArea = ownerScreen.WorkingArea; var x = workingArea.X + distance; var y = workingArea.Y; var w = workingArea.Width - distance; var h = workingArea.Height; this.MaximizedBounds = new Rectangle(x, y, w, h); } else { this.MaximizedBounds = new Rectangle(0, 0, 0, 0); } if (this.WindowState == FormWindowState.Maximized) { this.WindowState = FormWindowState.Normal; this.WindowState = FormWindowState.Maximized; } }
To reproduce: use the following code snippet: public Form1() { InitializeComponent(); this.radDropDownList1.SelectedIndexChanged+=radDropDownList1_SelectedIndexChanged; this.radDropDownList1.Items.Add("TelerikMetro"); this.radDropDownList1.Items.Add("Windows8"); this.radDropDownList1.Items.Add("VisualStudio2012Dark"); this.radDropDownList1.SelectedIndex = 1; this.SizeChanged+=Form1_SizeChanged; } private void radDropDownList1_SelectedIndexChanged(object sender, Telerik.WinControls.UI.Data.PositionChangedEventArgs e) { ThemeResolutionService.ApplicationThemeName = this.radDropDownList1.Text; } 1. Use two monitors and decrease the screen resolution to the main monitor. 2. Run the application from the first monitor and move the form to the second monitor. 3. Resize the form on a way to increase the form's height to be greater than the height of the screen resolution of the main monitor. 4. Change the theme. You will notice that that form is resized. Workaround: public Form1() { InitializeComponent(); this.radDropDownList1.SelectedIndexChanged += radDropDownList1_SelectedIndexChanged; this.radDropDownList1.Items.Add("TelerikMetro"); this.radDropDownList1.Items.Add("Windows8"); this.radDropDownList1.Items.Add("VisualStudio2012Dark"); this.radDropDownList1.SelectedIndex = 1; this.SizeChanged += Form1_SizeChanged; } private void Form1_SizeChanged(object sender, EventArgs e) { if (fSize != Size.Empty) { this.SizeChanged-= Form1_SizeChanged; this.Size = fSize; this.SizeChanged += Form1_SizeChanged; } } Size fSize = Size.Empty; private void radDropDownList1_SelectedIndexChanged(object sender, Telerik.WinControls.UI.Data.PositionChangedEventArgs e) { fSize = this.Size; ThemeResolutionService.ApplicationThemeName = this.radDropDownList1.Text; fSize=Size.Empty; }
If you have an MDI form with controls anchored to bottom-left, and if the form is shown the following way: Form form = new ChildForm() form.MdiParent = this; form.Show(); private void ChildForm_Load(object sender, EventArgs e) { this.ThemeName = "Office2007Black"; } the anchored controls will be misplaced. WORKAROUND: either set the parent after show: Form form = new ChildForm() form.Show(); form.MdiParent = this; or do not use the Load event to apply theme - use the constructor or the Shown event: public ChildForm() { InitializeComponent(); this.ThemeName = "Office2007Black"; }
To reproduce: - Add form and set its AutoScroll property to true. add some controls so the scrollbars appear. - Dock the form in a smaller window as a MDI child. Workaround - Use scrollable panel.
When you have a RadPageViewPage with a TableLayoutPanel inside a RadForm, by changing the theme the TableLayoutPanel is shrinking. Pleas find attached a sample project. Workaround: use a ShapedForm instead of RadForm/RadRibbonForm.
When the form border style is set to none the form still has minimum width.
To reproduce: Create a RadFrom, make it MDIParent and add MDI children Set the RightToLeft property of the MDIParent to Yes and you will see that the the left side of the child forms is a little cut off. This can be seen by comparing the distance between the end of the form and the X button.
Create a custom theme starting from Aqua theme. Change the Font for RadLabelElement-TextPrimitive to "Microsoft Sans Serif, 10pt". Save the theme and apply it to the entire application. Show several times a RadMessageBox with long text. The first time the RadMessageBox is sized correcly to its content. Each next showing, cuts off the text. Workaround: the possible workaround that I can suggest is to dispose the RadMessageBox instance after showing it: Private Sub RadButton1_Click(sender As Object, e As EventArgs) Handles RadButton1.Click RadMessageBox.Show(Me, "If you have some veeeeery long sample text, the messagebox " & _ "should be resized according to its content.", "Caption", MessageBoxButtons.OK, My.Resources.image) RadMessageBox.Instance.Dispose() End Sub
Form should be closed only with Left mouse button
When the RadForm is used as MDI Child hosted by RadDock, the rendering of the form is not appropriate.
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
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.
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; }