When you customize a theme for RadSplitButton, you are not able to change the color of the action button element when it is pressed and the drop down is not opened. Workaround: this.radSplitButtonElement2.ActionButton.MouseDown+=ActionButton_MouseDown; this.radSplitButtonElement2.ActionButton.MouseUp+=ActionButton_MouseUp; private void ActionButton_MouseUp(object sender, MouseEventArgs e) { this.radSplitButtonElement2.ActionButton.ButtonFillElement.ResetValue(LightVisualElement.BackColorProperty, ValueResetFlags.Local); this.radSplitButtonElement2.ActionButton.ButtonFillElement.ResetValue(LightVisualElement.GradientStyleProperty, ValueResetFlags.Local); } private void ActionButton_MouseDown(object sender, MouseEventArgs e) { this.radSplitButtonElement2.ActionButton.ButtonFillElement.BackColor = Color.Red; this.radSplitButtonElement2.ActionButton.ButtonFillElement.GradientStyle = GradientStyles.Solid; }
To reproduce: - Add SplitButton to a ribbon bar and set its image. - Disable the button. Workaround: this.radSplitButtonElement1.UseDefaultDisabledPaint = true;
Workaround: public class MyRadToggleSwith : RadToggleSwitch { public override string ThemeClassName { get { return typeof(RadToggleSwitch).FullName; } } protected override void OnGotFocus(EventArgs e) { base.OnGotFocus(e); this.ToggleSwitchElement.Focus(); } } or simply put focus to the element when the control receives the focus: private void radToggleSwitch_GotFocus(object sender, EventArgs e) { this.radToggleSwitch1.ToggleSwitchElement.Focus(); }
To reproduce: - Create a dpi aware application and add a checkbox to it. - Change your DPI setting to 200% and start the application. - The checkmark is not scaled only the text is. Workaround: this.radCheckBox2.ButtonElement.CheckMarkPrimitive.CheckElement.UseFixedCheckSize = false; this.radCheckBox2.ButtonElement.CheckMarkPrimitive.CheckElement.MinSize = new Size(100, 100);
Workaround: this.radDropDownButton1.DropDownButtonElement.DropDownMenu.PopupElement.AutoSize = false; this.radDropDownButton1.DropDownButtonElement.DropDownMenu.PopupElement.Size = new Size(300, 300);
To reproduce: - Add 3 radio buttons to a user control. - Set the ToggleState of the second radio button to On. - Show the user control in a DockWindow. - You will notice that the first toggle button is selected. Workaround: Set the toggle state after the window is added to the RadDock void radDock1_DockWindowAdded(object sender, Telerik.WinControls.UI.Docking.DockWindowEventArgs e) { if (e.DockWindow.Text == "UserControl11") { UserControl1 uc1 = e.DockWindow.Controls[0] as UserControl1; ((RadRadioButton)uc1.Controls[1]).ToggleState = Telerik.WinControls.Enumerations.ToggleState.On; } }
How to reproduce: add several menu items displaying only images to the split button and set the MaximumSize property of the drop-down menu Workaround: public RadForm1() { InitializeComponent(); this.radSplitButton1.DropDownButtonElement.DropDownMenu.MaximumSize = new Size(30, 0); RadScrollBarElement element = this.radSplitButton1.DropDownButtonElement.DropDownMenu.PopupElement.FindDescendant<RadScrollBarElement>(); element.Visibility = Telerik.WinControls.ElementVisibility.Collapsed; element.RadPropertyChanging += Element_RadPropertyChanging; } private void Element_RadPropertyChanging(object sender, Telerik.WinControls.RadPropertyChangingEventArgs args) { if (args.Property.Name == "Visibility") { args.Cancel = true; } }
To reproduce: 1. Open the Demo application >> Button example. 2. Change the theme to TelerikMetroBlue. 3. Click with the right/middle mouse button and you will notice that the button clicked states is indicated. Workaround: remove the MouseDown state in Visual Style Builder for the fill element as it is illustrated on the attached screenshot.
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(); } }
ToggleStateChanging event is fired before the KeyDown event which should actually trigger the toggle change operation. This happens when you press the Enter key.
If there are boolean application Settings:
It is good to have the possibility to bind the Checked property for RadCheckBox in a similar way like the MS CheckBox offers:
RadCheckBox offers only the Text option:
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();
The arrow button of RadSplitButton is cut if you set a longer text and TextWrap=true.
IMPROVE. RadCheckBox - one should be able to increase the size of the check box and the check mark
To reproduce: - radSplitButton1.DefaultItem = radSplitButton1.Items[0]; - press and hold the action button - the styles are not changed