It will be convenient for our users if we introduce a CommandBarMaskedEditBox that they can add to their CommandBar at design-time.
To reproduce: - Dock the command bar inside a tool window (to left). - Add four buttons to the strip. - Set the VisibleInStrip property of the one button to false. - When the application is started the last button is outside the strip. The issue is reproduced when commandbar is docked directly in the form not just the tool window. Workaround - Use the Visibility property instead.
To reproduce: 1. Run the application and click the button. A message box appears. Close the message box. 2. Minimize the form and restore it to normal state. 3. Click the button again. You will encounter an error because the CommandBarDropDownList.SelectedItem property is set to null. Workaround: private void radButton1_Click(object sender, EventArgs e) { this.commandBarDropDownList1.DropDownAnimationEnabled = false; this.commandBarDropDownList1.DropDownListElement.ShowPopup(); this.commandBarDropDownList1.DropDownListElement.ClosePopup(Telerik.WinControls.UI.RadPopupCloseReason.Mouse); Product product = this.commandBarDropDownList1.SelectedItem.DataBoundItem as Product; MessageBox.Show(product.Description); }
To reproduce: 1. Add a RadCommandBar with several items 2. Add CommandBarTextBox and change its size to have 200 px width . 3. Set the CommandBarTextBox.TextBoxElement.TextAlign property to Right in order to align the text to the right. The designer shows the correct text alignment. However, this setting is not serialized in the designer file and when you run the application the text is left aligned.
Workaround: this.commandBarSplitButton1.MinSize = new Size(this.commandBarSplitButton1.Size.Width + 10, 0);
To reproduce: 1. Add a RadCommandBar with a CommandBarButton. 2. Add a RadDateTimePicker, a RadMultiColumnComboBox, a ComboBox, a DateTimePicker. Subscribe to their Validating event. 3. Add a shortcut for the CommandbarButton: Me.CommandBarButton1.ShowKeyboardCues = True Me.CommandBarButton1.UseMnemonic = True Me.CommandBarButton1.Shortcuts.Add(New RadShortcut(Keys.Alt, Keys.F)) Note that when you focus one of the added controls in 2. and press Alt+F, the CommandBarButton.Click event is fired, but the Validating event for the previously focused control is not fired. This behavior is not observed for RadButton for example. Workaround: Public Class Form1 Protected Overrides Function ProcessCmdKey(ByRef msg As Message, keyData As Keys) As Boolean Select Case keyData Case (Keys.Alt Or Keys.F) CommandBarButton1.Focus() CommandBarButton1.PerformClick() Exit Select End Select End Class
Since the settings are serialized, the buttons does not have hover, pressed and other effects. Workaround: instead of making the buttons protected, apply this setting to RadCommandBar control and expose the buttons as properties.
To reproduce: - Add some controls to a command bar. - Get the PreferredSize like this: Console.WriteLine(radCommandBar1.PreferredSize.ToString()); Workaround: class MyCommandBar : RadCommandBar { public override Size GetPreferredSize(Size proposedSize) { if (proposedSize.Width == 0 && proposedSize.Height == 0) { return this.Size; } return base.GetPreferredSize(proposedSize); } }
To reproduce: - Add RadCommanBar to a form and the shown and close the form several times.
Workaround: set the RadCommandBar.EnableRadAccessibilityObjects property to false.
Workaround: use the attached below theme files. How custom themes can be loaded - http://www.telerik.com/help/winforms/themes-using-custom-themes.html
Workaround: public partial class RadForm1 : Telerik.WinControls.UI.RadForm { public RadForm1() { InitializeComponent(); this.commandBarDropDownButton2.DropDownMenu.DropDownOpening += DropDownMenu_DropDownOpening; } private void DropDownMenu_DropDownOpening(object sender, CancelEventArgs e) { if (this.WindowState == FormWindowState.Maximized) { RadDropDownMenu dMenu = sender as RadDropDownMenu; RadPopupOpeningEventArgs eventArgs = (RadPopupOpeningEventArgs)e; eventArgs.CustomLocation = new System.Drawing.Point(eventArgs.CustomLocation.X + this.commandBarDropDownButton2.Size.Width, eventArgs.CustomLocation.Y); } } }
To reproduce: add a RadCommandBar to the form with several CommandBarStripElements. Change the Name property for one of the CommandBarStripElements at design time. You will notice that the new name is not serialized in the designer file.
To reproduce: Add a RadCommandBar with a row and a strip. Add a CommandBarSplitButton and subscribe to its Click event. You will see that when you click the arrow button the event will be fired. In result you cannot distinguish whether the arrow button is clicked. Workaround: private bool arrowButtonClicked; void ArrowPart_Click(object sender, EventArgs e) { this.arrowButtonClicked = true; //... CommandBarSplitButton.ArrowPart logic } void button_Click(object sender, EventArgs e) { if (this.arrowButtonClicked) { this.arrowButtonClicked = false; return; } //...CommandBarSplitButton logic }
Assign a ImageList to RadCommnandBar and add CommandBarDropDownButton to a strip. Then open the Items collection editor for this drop down button, add new RadMenuItem and attempt to assign an ImageIndex from the ImageList of the control.
To reproduce: - Remove and dispose a strip at runtime: private void BRemoveItems_Click(object sender, EventArgs e) { if (this.commandBarRowElement1.Strips.Count > 1) { if (this.commandBarRowElement1.Strips[1] is MyRadStripElement) { MyRadStripElement stripForRemoval = (MyRadStripElement)this.commandBarRowElement1.Strips[1]; this.commandBarRowElement1.Strips.Remove(stripForRemoval); stripForRemoval.Dispose(); } } } Workaround: dispose the item before remove it.
To reproduce: Add a RadCommandBar, add some rows, strips and buttons. Apply any of the following themes: Office2010Black, Office2010Blue or VisualStudio2012Light . You will notice that the whole RadCommandBar has no theming. Workaround: Download the theme files below and apply them as follows: ThemeResolutionService.LoadPackageFile(@"themPath/theme.tssp"); ThemeResolutionService.ApplicationThemeName = "VisualStudio2012Light";
When you change the ImageList property of RadCommandBar at runtime, the images of the items are not updated. In addition, if there are items in the overflow popup, their image is reset to default. WORKAROUND: You need to reset each item's ImageIndex property in order for the new image to appear and you also need to update the ImageList property of the overflow popups manually. private void radCheckBox1_ToggleStateChanged(object sender, StateChangedEventArgs args) { radCommandBar1.ImageList = radCheckBox1.Checked ? imageList32 : imageList16; ToggleImageIndices(); } private void ToggleImageIndices() { foreach (var row in radCommandBar1.Rows) { foreach (var strip in row.Strips) { ((RadControl)strip.OverflowButton.OverflowPanel.Layout.ElementTree.Control).ImageList = radCommandBar1.ImageList; foreach (var item in strip.Items) { int oldIndex = item.ImageIndex; item.ImageIndex = -1; item.ImageIndex = oldIndex; } foreach (var item in strip.OverflowButton.OverflowPanel.Layout.Children.OfType<RadCommandBarBaseItem>()) { int oldIndex = item.ImageIndex; item.ImageIndex = -1; item.ImageIndex = oldIndex; } } } }