Description:If I set the VisibleInStrip property on a CommandBarButton to false, I can still click on the button. To reproduce: 1.First Scenario: -add a RadCommandBar with one CommandBarStripElement; -add 3 CommandBarButtons separated by CommandBarSeparator; -add Click event handler to each button; -set VisibleInStrip=false to the second button of the CommandBarButtons; Try to click the area between the existing two CommandBarSeparators; As a result the Click event is fired for the hidden second button. 2.Second Scenario: -add a RadCommandBar with one CommandBarStripElement; -add 3 CommandBarButtons; -add Click event handler to each button; -set VisibleInStrip=false to the second button of the CommandBarButtons; In some cases clicking the area over the first button fires the Click event of the hidden button. Workaround: Use commandBarButton1.Visibility = ElementVisibility.Collapsed;
Since the IsChecked property is obsolete one cannot use simple data binding to bind the control.
If you have a RadCommandBar instance on a form, and on the same form you have a ContextMenuStrip with one toolstripmenuitem, you will notice that you are not able to select anything from the form.
PasswordChar of TextBoxElement of CommandBarTextBox is not serialized at design-time.
The KeyDown event for CommandBarDropDownList does not fire. The same is the situation with the DropDownListElement.
Currently, in order to set the focus on the textbox part of an item of RadCommandBar in Form_Load, one should do this: this.commandBarTextBox1.TextBoxElement.TextBoxItem.HostedControl.Select(); There should be a shortcut API that allows for easier setting of the focus.
Data-bounded CommandBarDropDownList shows only currently selected item when the CommandBarDropDownList located into overflow list. Workarround: Assign the CommandBar's BindingContext explicitly public partial class Form1 : Form { public Form1() { InitializeComponent(); this.commandBarDropDownList1.BindingContext = this.BindingContext; }
Description: add a RadCommandBar and Dock it to the Left. Add several CommandBarToggleButton and CommandBarButton items and set their StretchHorizontally property to true and StretchVertically property to false. Save changes, close the designer and open it again. The settings are not kept.
Workaround: use the following approach: private void commandBarDropDownList1_EnabledChanged(object sender, EventArgs e) { if (this.commandBarDropDownList1.Enabled) { this.commandBarDropDownList1.DropDownListElement.TextBox.BackColor = Color.White; } else { this.commandBarDropDownList1.DropDownListElement.TextBox.TextBoxItem.BackColor = Color.FromArgb(210, 210, 210); } }
DECLINED: RadCommandBar assigns the DesiredLocation of each strip on the first layout pass and keeps this value until a different one is explicitly specified (via drag or via setting the property). The difference in the initial DesiredSize of the strips (depending on whether they have the grip/overflow button collapsed) results in different initial DesiredLocation settings. The proper way to avoid the gaps is to explicitly set the DesiredLocation property of each strip when collapsing the grips and overflow buttons. To reproduce: 1.Add a RadCommandBar with several CommandBarStripElement. Each strip should contain a single button element. 2.Add a RadButton. 3.Use the following code snippet: private Dictionary<ElementVisibility, ElementVisibility> toggle; public Form1() { InitializeComponent(); toggle = new Dictionary<ElementVisibility, ElementVisibility>(); toggle[ElementVisibility.Collapsed] = ElementVisibility.Visible; toggle[ElementVisibility.Hidden] = ElementVisibility.Visible; toggle[ElementVisibility.Visible] = ElementVisibility.Collapsed; } private void ButtonClick() { foreach (var row in radCommandBar1.Rows) { foreach (var strip in row.Strips) { Toggle(strip); } } } private void radButton1_Click(object sender, EventArgs e) { ButtonClick(); } private void Toggle(Telerik.WinControls.UI.CommandBarStripElement strip) { Toggle(strip.Grip); Toggle(strip.OverflowButton); } private void Toggle(Telerik.WinControls.RadElement element) { element.Visibility = toggle[element.Visibility]; } If you collapse the Grip and the OverflowButton of a CommandBarStripElement, there is a gap between CommandBarStripElements. Workaround: call the ButtonClick method in the form constructor.
To reproduce: -add CommandBarDropDownButton and add several items of type RadMenuButtonItem; -use the following code: this.commandBarDropDownButton1.DropDownMenu.DropDownClosed += DropDownMenu_DropDownClosed; private void DropDownMenu_DropDownClosed(object sender, Telerik.WinControls.UI.RadPopupClosedEventArgs args) { RadDropDownMenu dropDownMenu = sender as RadDropDownMenu; if (dropDownMenu != null) { CommandBarDropDownButton commandBarDropDownButton = dropDownMenu.Owner as CommandBarDropDownButton; commandBarDropDownButton.Text = dropDownMenu.ClickedItem.Text.ToString(); } } ClickedItem is null only in case of RadMenuButtonItem. Workaround: public class CustomCommandBarDropDownButton : CommandBarDropDownButton { protected override void CreateChildElements() { base.CreateChildElements(); this.DropDownMenu = new CustomDropDownMenu(this); } protected override Type ThemeEffectiveType { get { return typeof(CommandBarDropDownButton); } } } public class CustomDropDownMenu : RadDropDownMenu { public CustomDropDownMenu(RadElement ownerElement) : base(ownerElement, null) { } public override string ThemeClassName { get { return typeof(RadDropDownMenu).FullName; } } protected override void OnMouseClick(MouseEventArgs e) { RadMenuItemBase menuItem = this.GetMenuItemAtPoint(e.Location); if (menuItem is RadMenuButtonItem) { FieldInfo field = typeof(RadDropDownMenu).GetField("clickedItem", BindingFlags.NonPublic | BindingFlags.Instance); field.SetValue(this, menuItem); } base.OnMouseClick(e); } }
DisplayName property of RadCommandBarVisualElement class cannot be localized.
To reproduce: Add a row and a strip to the command bar, add items, set tooltips, make them hide in the overflow menu, they do not show their tooltips. Workaround: this.commandBar.Rows[0].Strips[0].OverflowButton.DropDownMenu.ToolTipTextNeeded += DropDownMenu_ToolTipTextNeeded; this.commandBar.Rows[0].Strips[0].OverflowButton.DropDownMenu.MouseMove += DropDownMenu_MouseMove; Point mousePosition = new Point(); void DropDownMenu_MouseMove(object sender, MouseEventArgs e) { this.mousePosition = e.Location; } void DropDownMenu_ToolTipTextNeeded(object sender, ToolTipTextNeededEventArgs e) { this.commandBar.Rows[0].Strips[0].OverflowButton.DropDownMenu.Owner = this; mousePosition.X += this.commandBar.Rows[0].Strips[0].Size.Width; mousePosition.Y += this.commandBar.Rows[0].Strips[0].Size.Height + 20; new ToolTip().Show("bbbb", this.commandBar, mousePosition, 1000); }
To reproduce: radCommandBar1.Dock = DockStyle.Left; CommandBarToggleButton toggleButton = new CommandBarToggleButton(); toggleButton.Text = "some text"; toggleButton.Orientation = Orientation.Vertical; toggleButton.DrawText = true; radCommandBar1.Rows[0].Strips[0].Items.Add(toggleButton); radCommandBar1.Rows[0].Strips[0].Orientation = Orientation.Vertical;
To reproduce: 1.Add RadCommandBar with one CommandBarStripElement and items to a form 2.Float the strip 3.Save the layout 4.Close the form 5.Open the form 6.Load the layout
Visual Studio's property window allow you to assign these properties the value of (none) or null. This will result in exception when the designer is reopened.
1. Create new project with RadCommandBar and add a button in it. 2. Set the button's AutoSize property to false. 3. Run the project and try to hide the button by clicking the overflow button.
Add a command bar button with the following configuration: DrawText = true; Text = "&New"; UseMnemonic = true; ShowKeyboardCues = true; and try to click it with Alt + N. You will see that you cannot.
The ItemClicked event of CommandBarStripElement does not fire when the strip is floating.
To reproduce: - add command bar to a form and dock it top - add button below the command bar and dock it fill - click the command bar and try to open the Rows collection editor from the properties window