To reproduce: 1. Drag a RadButton from the ToolBox and drop it onto the form. 2. Drag a TelerikMetroBlue theme from the ToolBox and drop it onto the form. 3. Change the button's theme at design time. You will notice the strange border around the control. Please refer to the attached gif file. However, when you save the form and reopen it the button looks ok.
To reproduce: Add a RadTextBox and a RadButton to a form. On the Leave event of RadTextBox show a RadMessageBox. Start the application. Focus the textbox and click the button. The RadMessageBox will show, click the OK button and now you will see that the button is in its 'IsDefault' state (it is a bit more obvious with the Office2010 themes) and no other controls receive mouse input unless you click on the form. Workaround: Set the CausesValidation property of RadButton to false.
To reproduce: - Add RadDropDownButton to a blank form. - Set its anchor property to top, right and its AutoSize property to true. - At runtime set the button text to a long string, you will notice that the button is resized to the right when it should be resized to the left. To workaround this you can subscribe to the SizeChanged event of the button change its location depending on the new size: Size prevSize; public Form1() { InitializeComponent(); radDropDownButton1.AutoSize = true; this.Shown += Form1_Shown; } void Form1_Shown(object sender, EventArgs e) { prevSize = radDropDownButton1.Size; radDropDownButton1.SizeChanged += radDropDownButton1_SizeChanged; } void radDropDownButton1_SizeChanged(object sender, EventArgs e) { RadDropDownButton button = sender as RadDropDownButton; button.Location = new Point(button.Location.X - (radDropDownButton1.Size.Width - prevSize.Width), button.Location.Y); prevSize = button.Size; } private void radButton2_Click(object sender, EventArgs e) { radDropDownButton1.Text = "Very long button text set"; }
To reproduce: Add a RadButton to a form. Set an image, remove the text and set the shape of the ButtonElement to a new RoundRectShape. You will see that the image will not be painted with a shape. Workaround: Paint the image manually: Image img = Image.FromFile(@"jpg.jpg"); RoundRectShape shape1 = new RoundRectShape(10); protected override void OnLoad(EventArgs e) { this.button = new RadButton(); this.button.Parent = this; this.button.ButtonElement.Shape = shape1; this.button.Paint += button_Paint; } void button_Paint(object sender, PaintEventArgs e) { e.Graphics.SetClip(shape1.CreatePath(new Rectangle(Point.Empty, this.button.Size))); e.Graphics.DrawImage(img, new Rectangle(Point.Empty, this.button.Size)); }
To reproduce: Create a form with RadButton and do some action on the Click event. Use the following Tool to click the button using the DoDefaultAction option http://msdn.microsoft.com/en-us/library/windows/desktop/dd318521(v=vs.85).aspx . You will notice that the click action will not be executed Workaround: public class MyButton : RadButton { protected override AccessibleObject CreateAccessibilityInstance() { return new MyAccessibilityInstance(this); } } public class MyAccessibilityInstance : RadButtonAccessibleObject { public MyAccessibilityInstance(Control owner) : base(owner) { } public override void DoDefaultAction() { ((RadButton)base.Owner).PerformClick(); } }
To reproduce: Add a RadRadioButton to a form. Add a Button which opens a OpenFileDialog. Open the dialog and position it on top of the RadRadioButton so when you double click on a file the mouse cursor to be exactly over the RadRadioButton. Double click a file and you will see that the RadRadioButton is checked. This behavior can be changed by changing the ClickMode of the RadioButtonElement but setting it has no effect.
To reproduce: - click a RadCheckBox with the right mouse button and you will notice the the state of the checkbox is changed. Workaround: public class LeftCheckBox : RadCheckBox { protected override void OnMouseUp(MouseEventArgs e) { if (e.Button == System.Windows.Forms.MouseButtons.Left) { base.OnMouseUp(e); } } public override string ThemeClassName { get { return typeof(RadCheckBox).FullName; } set { } } }
Just like in the case of RadCheckBox, RadToggleButton has a few states. Therefore, we need to add the possibility in Visual Style Builder to style the RadToggleButton when it is disabled and taking into consideration the toggle state (on/off)
No matter what is the toggle state of the ToggleButton, when disable always shows as ToggleState.Off
When image is being inserted to the ActionButton in RadSplitButton the ArrowButton might get overlaped if the text of the ActionButton is very long. Workaround is to subtract the width of the image from the width of the text manually. int actionButtonWidth = radSplitButton1.DropDownButtonElement.ActionButton.Size.Width; int imageWidth = 40; // Sample rate should be equal to the width of the image in pixels int desiredTextWidth = actionButtonWidth - imageWidth; radSplitButton1.DropDownButtonElement.ActionButton.TextElement.MaxSize = new Size(desiredTextWidth, 0); radSplitButton1.DropDownButtonElement.ActionButton.TextWrap = true;
To reproduce, create a RadButton on a form with the below settings. The image is any 32x32 image. this.radButton1.Font = new System.Drawing.Font("Segoe UI", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.radButton1.Image = global::TestPopup.Properties.Resources.Image32x32; this.radButton1.Location = new System.Drawing.Point(13, 13); this.radButton1.Size = new System.Drawing.Size(131, 44); this.radButton1.Text = "The Quick Brown Fox"; this.radButton1.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft; this.radButton1.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText; this.radButton1.TextWrap = true;
With Office2010Blue RadRadioButton not render correctly its state in disabled state if programmatically change the Checked state, i.e. control remains visible unchecked
If the CheckBox is not checked and the box is disabled it is not possible to programmatically change the Checked state, i.e. control remains visible as unchecked until it is enabled. Tested with Office2010Blue Theme Please, test with Office2012Light
To reproduce: RadButton button = new RadButton(); button.AutoSize = true; button.MaximumSize = new Size(74, 0); button.Text = "Define Horizontal Measurement"; Controls.Add(button); WORKAROUND: set the MaxSize property of the border primitive to the same value as the MaxSize of the control: button.ButtonElement.BorderElement.MaxSize = new Size(74, 0);
ToggleStateChanging args are not giving the old value of the button.
Setting RadDropDownButtonElement MinSize property does not make the RadDropDownButton control stretch to fit its element. Currently, the issue can be avoided through adding the following three lines of code: this.radDropDownButton1.RootElement.StretchHorizontally = false; this.radDropDownButton1.RootElement.StretchVertically = false; this.radDropDownButton1.RootElement.SaveCurrentStretchModeAsDefault();
IMPROVE. RadCheckBox - one should be able to increase the size of the check box and the check mark
Steps to reproduce: 1. Add two check boxes to a form 2. Set the Checked property of one to true 3. Set their enable property to false 4. Set the theme to TelerikMetroBlue Run the project and you will see that both check boxes look the same - disabled and unchecked. The same applies to Office2010Blue and RadRadioButton Workaround it by enabling the checkboxes for a moment and then disabling them.