RadMessageBox - Buttons are not arranged correctly in RTL
Workaround: use RadRibbonForm instead or set minimum and maximum size
To reproduce: 1. Open a RadForm 2. Maximize the form. 3. Restore the form. Then we can see odd line on the bottom of title bar / top of the form. If you resize the form (make it bigger), new visible areas of form doesn't contain this weird line. Workaround: protected override void WndProc(ref Message m) { FormWindowState currentWindowState = this.WindowState; base.WndProc(ref m); if (currentWindowState == FormWindowState.Maximized && this.WindowState== FormWindowState.Normal) { this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.SizableToolWindow; this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.Sizable; } }
To reproduce: Create a RadForm and set the property as follows: public Form1() { InitializeComponent(); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow; } Workaround: Set the ShowIcon property to false: public Form1() { InitializeComponent(); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow; this.ShowIcon = false; }
To reproduce: Show RadMessageBox as follows: RadMessageBox.Show(this, "מסר כלשהו", "Caption", MessageBoxButtons.OKCancel, RadMessageIcon.Error, MessageBoxDefaultButton.Button1, RightToLeft.Yes, "מסר2 כלשהו"); Open the details button and you will see that the text is כלשהו מסר2
To reproduce: Create a RadForm and use the following code: public Form1() { InitializeComponent(); var theme = new Telerik.WinControls.Themes.Windows7Theme(); ThemeResolutionService.ApplicationThemeName = theme.ThemeName;// "Windows7"; this.AllowTheming = false; } Start the application on Windows 7, you will see that the close/minimize/maximize buttons cannot be clicked. Workaround: Do not set the AllowTheming property or set it to true
Please refer to the attached screenshot. Workaround: use a RadForm without RadRibbonFormBehavior and hide the FormElement.TitleBar.
To reproduce: private void radButton1_Click(object sender, EventArgs e) { Application.Exit(); } private void Form1_FormClosing(object sender, FormClosingEventArgs e) { RadMessageBox.Show("Do you want to exit?", "Confirmation", MessageBoxButtons.YesNo); } Workaround: Show the RadMessageBox first and then call the Application.Exit method according to the DialogResult. DECLINED: When Application.Exit() is called it iterates through all forms and for each of them calls the FormClosing event. Currently the RadMessageBox is shown in a new form. So in this case during the iterating forms collection a new form is added and this causes the exception "Collection was modified; enumeration operation may not execute.". This is expected behavior and there are two possible solutions to prevent application from throwing exception: - Use this.Close(); to close the application. - Make your checks, show RadMessageBox and after that, if needed call Application.Exit();
To reproduce: public partial class Form1 : RadForm { public Form1() { InitializeComponent(); this.IsMdiContainer = true; } private void radButton1_Click(object sender, EventArgs e) { RadForm childForm = new RadForm(); childForm.Text = "MDI Child " + DateTime.Now.ToShortTimeString(); childForm.MdiParent = this; childForm.WindowState = FormWindowState.Maximized; childForm.Show(); } }
To reproduce: - Create blank WinForms RadForm Application. - Set WindowState property to Maximized. - Add RadGroupBox to the form. Set equal space on all sides. - Anchor the group box to all sides. - Launch application - spacing around outside of group box is incorrect. - Restore form to normal size - spacing around group box is incorrect. Workaround: radGroupBox1.Dock = DockStyle.Fill; radGroupBox1.GroupBoxElement.Margin = new Padding(20);
For the time being to show the grid I would recommend you to use an empty RadStatusStrip.
To reproduce: 1. Use the following code snippet: RadMessageBox.Show("RadMessageBox Some message box text", "Caption", MessageBoxButtons.OK, RadMessageIcon.Error); 2. The text is not aligned with the icon
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.
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.
Broken in Q2 2015 Workaround: get current dpi settings and resize the form float dpiX = 0; float dpiY = 0; Graphics graphics = this.CreateGraphics(); dpiX = graphics.DpiX; dpiY = graphics.DpiY; this.Width *= dpiX / 96; this.Height *= dpiY / 96;
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; } }
How to reproduce: public partial class Form1 : Form { public Form1() { InitializeComponent(); this.IsMdiContainer = true; this.Load += Form1_Load; } private void Form1_Load(object sender, EventArgs e) { RadForm form = new RadForm(); form.Text = "MDI Child 1"; form.MdiParent = this; form.Show(); } private void radButton1_Click(object sender, EventArgs e) { RadForm activeChild = this.ActiveMdiChild as RadForm; if (activeChild == null) { MessageBox.Show("no active form child found!"); return; } else { SaveAsBitmap(activeChild, activeChild + ".Jpeg"); MessageBox.Show("Screen Captured successfully."); } } public void SaveAsBitmap(Form form, string fileName) { SaveFileDialog dialog = new SaveFileDialog(); dialog.Filter = "JPeg Image|*.jpg|Bitmap Image|*.bmp|Gif Image|*.gif"; if (dialog.ShowDialog() == DialogResult.OK) { Bitmap bmp = new Bitmap(form.Width, form.Height); form.DrawToBitmap(bmp, new Rectangle(0, 0, form.Width, form.Height)); bmp.Save(dialog.FileName, ImageFormat.Jpeg); } } } Workaround: public partial class Form1 : Form { public Form1() { InitializeComponent(); this.IsMdiContainer = true; this.Load += Form1_Load; } private void Form1_Load(object sender, EventArgs e) { RadForm form = new RadForm(); form.Text = "MDI Child 1"; form.MdiParent = this; form.Show(); } private void radButton1_Click(object sender, EventArgs e) { RadForm activeChild = this.ActiveMdiChild as RadForm; if (activeChild == null) { MessageBox.Show("no active form child found!"); return; } else { SaveAsBitmap(activeChild, activeChild + ".Jpeg"); MessageBox.Show("Screen Captured successfully."); } } public void SaveAsBitmap(Form form, string fileName) { Bitmap bmpScreenshot = new Bitmap(form.Bounds.Width, form.Bounds.Height, PixelFormat.Format32bppArgb); Graphics gfxScreenshot = Graphics.FromImage(bmpScreenshot); Point pt = form.Parent.PointToScreen(form.Location); gfxScreenshot.CopyFromScreen(pt.X, pt.Y, 0, 0, form.Bounds.Size, CopyPixelOperation.SourceCopy); SaveFileDialog saveImageDialog = new SaveFileDialog(); saveImageDialog.Title = "Select output file:"; saveImageDialog.Filter = "JPeg Image|*.jpg|Bitmap Image|*.bmp|Gif Image|*.gif"; if (saveImageDialog.ShowDialog() == DialogResult.OK) { bmpScreenshot.Save(saveImageDialog.FileName, ImageFormat.Png); } } }
To reproduce: - Start the narrator, open a message box and close it fast. Workaround: void button_Click(object sender, EventArgs e) { RadMessageBox.Instance.Shown += Instance_Shown; RadMessageBox.Show("test"); } void Instance_Shown(object sender, EventArgs e) { RadMessageBoxForm form = sender as RadMessageBoxForm; typeof(RadMessageBoxForm).GetField("accObjectCreated", System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance).SetValue(form, false); }
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.