Telerik Forums
UI for WinForms Forum
1 answer
27 views

My form have some RadCommandBar, when I click on OverflowButton then a dropdownMenu to show with default two item:

1. Add or Remove Buttons

2. Customize...

And then,  my mouse click on another control on my form, but I see that  RadCommandBar's DropdownMenu do not close.

I also try to some again, but do not anything change.

You can see my image I attached below. I use Telerik version: R3 2022 window form from Nuget package for Application .Net Core

Thank you so much.

Nadya | Tech Support Engineer
Telerik team
 answered on 09 Jan 2024
1 answer
36 views

Hi all,

i tried to add a CommandBarSeparator into a CommandBarStripElement (of a RadCommandBar) .

The RadCommandBar has dock = Left...so , i would like to have a separator like an horizontal line

But..when i add CommandBarSeparator (at runtime) the commandBar shows a separator like a vertical line

I have tried to set commandBarSeparator.orientation to horizontal , but has no effects.

 

Nadya | Tech Support Engineer
Telerik team
 answered on 07 Nov 2023
2 answers
70 views
Hi,

In a RadMenuItem, it seems that the RadDropDownMenu graphical object containing children is automatically created when the MyMenuItem.Items property is accessed.
Often, the Items property is accessed without adding any children, for example to access MyMenuItem.Items.Count property.
RadDropDownMenu object is therefore useless and affects the size of a RadMenuItem in memory.
I'm considering overriding the Items property or the EnsureDropDownCreated method of the RadMenuItemBase class to work around this issue.
Is there a method that you recommend or do not recommend?

We are using 2022.3.921 version.

Thanks for your feedback.
Dess | Tech Support Engineer, Principal
Telerik team
 answered on 25 Oct 2022
1 answer
133 views

Hi Everyone,

Is there a way to hide the customize button of a CommandBarStrip ?

Thank you very much :)

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 25 Mar 2022
1 answer
79 views

Hello,

I have an MDI parent form with a radcommandbar across the top.

The commandbar contains 2 commandstripelements which have several buttons

One is left justified and one is right justified

Everything is working fine except when I deploy it to a touch enabled / touchscreen client.  Some users are accidentally dragging the commandstripelements into one another and even dragging them off the command bar making them disappear entirely.

Is there a way to disable dragging or reordering of the commandstrips.   Ideally I don't want any of the items to move at all

I have already tried

For each commandstripelemnt I set

            commandBarStripElement1.AllowDrag = false;
            commandBarStripElement1.AllowDrop = false;
            commandBarStripElement1.EnableDragging = false;
            commandBarStripElement1.EnableFloating = false;

For each button in either strip element I set

buttonX.AllowDrag = false;

I even tried returning e.Canceled in BeginDrag

Nothing seems to be working 

Any help would be appreciated

 

Thanks

Kevin


 

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 21 Jan 2022
2 answers
116 views

I am testing Telerik controls for a project under VS2022 and WinForms .NET Core 6.

There does not seem to be a way to add items to the bar, or am I missing something? Shouldn't there be a button to add Items as in the sample documentation videos/screenshot? 

 

 

this is what I was expecting looking up Telerik documentation:

 

Hristo
Telerik team
 answered on 17 Nov 2021
1 answer
124 views

I have a RadMenu in a new application where I set the Font property to "Segoe UI 9pt". While all the top-level menu items appear as expected, the drop-downs revert back to "Segoe UI 8.25pt".  Aren't the Font properties ambient? I really don't want to have to explicitly set all the RadMenuItem.Font properties.

What am I missing?

As a related follow-up, I would have expected the RadMenu, RadCommandBar, and RadStatusStrip's Font properties to be ambient also, and default to the Form's Font.

This is day two of my evaluation of the library.

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 02 Sep 2021
1 answer
132 views

Hi there,

Using control version 2021.2.615

VS2019 16.10.3

 

I have some code using a CommandBar and CommandBarStrips as below:

            // 
            // CommandBar
            // 
            this.CommandBar.Dock = System.Windows.Forms.DockStyle.Top;
            this.CommandBar.Location = new System.Drawing.Point(0, 25);
            this.CommandBar.Name = "CommandBar";
            this.CommandBar.Rows.AddRange(new Telerik.WinControls.UI.CommandBarRowElement[] {
            this.CommandBarRow});
            this.CommandBar.Size = new System.Drawing.Size(1241, 31);
            this.CommandBar.TabIndex = 4;
            this.CommandBar.ThemeName = "FluentDark";
            // 
            // CommandBarRow
            // 
            this.CommandBarRow.MinSize = new System.Drawing.Size(25, 25);
            this.CommandBarRow.Name = "CommandBarRow";
            this.CommandBarRow.Strips.AddRange(new Telerik.WinControls.UI.CommandBarStripElement[] {
            this.CommandBarToolStrip,
            this.CommandBarModelStrip});
            // 
            // CommandBarToolStrip
            // 
            this.CommandBarToolStrip.Alignment = System.Drawing.ContentAlignment.TopCenter;
            this.CommandBarToolStrip.AutoSize = true;
            this.CommandBarToolStrip.DisplayName = "commandBarStripElement1";
            this.CommandBarToolStrip.EnableDragging = false;
            this.CommandBarToolStrip.Name = "CommandBarToolStrip";
            // 
            // 
            // 
            this.CommandBarToolStrip.OverflowButton.Enabled = false;
            this.CommandBarToolStrip.OverflowButton.Visibility = Telerik.WinControls.ElementVisibility.Hidden;
            ((Telerik.WinControls.UI.RadCommandBarOverflowButton)(CommandBarToolStrip.GetChildAt(2))).Enabled = false;
            ((Telerik.WinControls.UI.RadCommandBarOverflowButton)(CommandBarToolStrip.GetChildAt(2))).Visibility = Telerik.WinControls.ElementVisibility.Hidden;
            // 
            // CommandBarModelStrip
            // 
            this.CommandBarModelStrip.Alignment = System.Drawing.ContentAlignment.TopRight;
            this.CommandBarModelStrip.AutoSize = true;
            this.CommandBarModelStrip.DisplayName = "commandBarStripElement1";
            this.CommandBarModelStrip.Items.AddRange(new Telerik.WinControls.UI.RadCommandBarBaseItem[] {
            this.lblCurrModel,
            this.CurrentModelList});
            this.CommandBarModelStrip.Name = "CommandBarModelStrip";
            // 
            // 
            // 
            this.CommandBarModelStrip.OverflowButton.Enabled = false;
            this.CommandBarModelStrip.OverflowButton.Visibility = Telerik.WinControls.ElementVisibility.Hidden;
            this.CommandBarModelStrip.Text = "";
            ((Telerik.WinControls.UI.RadCommandBarOverflowButton)(CommandBarModelStrip.GetChildAt(2))).Enabled = false;
            ((Telerik.WinControls.UI.RadCommandBarOverflowButton)(CommandBarModelStrip.GetChildAt(2))).Visibility = Telerik.WinControls.ElementVisibility.Hidden;
            // 
            // lblCurrModel
            // 
            this.lblCurrModel.Alignment = System.Drawing.ContentAlignment.MiddleLeft;
            this.lblCurrModel.DisplayName = "commandBarLabel1";
            this.lblCurrModel.Name = "lblCurrModel";
            this.lblCurrModel.Text = "Current Model : ";
            // 
            // CurrentModelList
            // 
            this.CurrentModelList.AutoEllipsis = true;
            this.CurrentModelList.AutoSize = false;
            this.CurrentModelList.Bounds = new System.Drawing.Rectangle(0, 0, 300, 24);
            this.CurrentModelList.DisplayName = "commandBarDropDownList1";
            this.CurrentModelList.DropDownAnimationEnabled = true;
            this.CurrentModelList.DropDownStyle = Telerik.WinControls.RadDropDownStyle.DropDownList;
            this.CurrentModelList.MaxDropDownItems = 0;
            this.CurrentModelList.Name = "CurrentModelList";
            this.CurrentModelList.Text = "";
            this.CurrentModelList.SelectedIndexChanged += new Telerik.WinControls.UI.Data.PositionChangedEventHandler(this.CurrentModelList_SelectedIndexChanged);

The above code compiles and runs with no issue.

 

If I open the designer for this form, then the above code is automatically replaced by the code below:

            // 
            // CommandBar
            // 
            this.CommandBar.Dock = System.Windows.Forms.DockStyle.Top;
            this.CommandBar.Location = new System.Drawing.Point(0, 25);
            this.CommandBar.Name = "CommandBar";
            this.CommandBar.Size = new System.Drawing.Size(1241, 31);
            this.CommandBar.TabIndex = 4;
            this.CommandBar.ThemeName = "FluentDark";
            ((Telerik.WinControls.UI.CommandBarRowElement)(CommandBar.GetChildAt(0).GetChildAt(0).GetChildAt(0))).Name = "CommandBarRow";
            ((Telerik.WinControls.UI.CommandBarRowElement)(CommandBar.GetChildAt(0).GetChildAt(0).GetChildAt(0))).MinSize = new System.Drawing.Size(25, 25);
            ((Telerik.WinControls.UI.CommandBarStripElement)(CommandBar.GetChildAt(0).GetChildAt(0).GetChildAt(0).GetChildAt(0))).Alignment = System.Drawing.ContentAlignment.TopCenter;
            ((Telerik.WinControls.UI.CommandBarStripElement)(CommandBar.GetChildAt(0).GetChildAt(0).GetChildAt(0).GetChildAt(0))).Name = "CommandBarToolStrip";
            ((Telerik.WinControls.UI.RadCommandBarOverflowButton)(CommandBar.GetChildAt(0).GetChildAt(0).GetChildAt(0).GetChildAt(0).GetChildAt(2))).Enabled = false;
            ((Telerik.WinControls.UI.RadCommandBarOverflowButton)(CommandBar.GetChildAt(0).GetChildAt(0).GetChildAt(0).GetChildAt(0).GetChildAt(2))).Visibility = Telerik.WinControls.ElementVisibility.Hidden;
            ((Telerik.WinControls.UI.CommandBarStripElement)(CommandBar.GetChildAt(0).GetChildAt(0).GetChildAt(0).GetChildAt(1))).Alignment = System.Drawing.ContentAlignment.TopRight;
            ((Telerik.WinControls.UI.CommandBarStripElement)(CommandBar.GetChildAt(0).GetChildAt(0).GetChildAt(0).GetChildAt(1))).Name = "CommandBarModelStrip";
            ((Telerik.WinControls.UI.CommandBarLabel)(CommandBar.GetChildAt(0).GetChildAt(0).GetChildAt(0).GetChildAt(1).GetChildAt(1).GetChildAt(0))).Text = "Current Model : ";
            ((Telerik.WinControls.UI.CommandBarLabel)(CommandBar.GetChildAt(0).GetChildAt(0).GetChildAt(0).GetChildAt(1).GetChildAt(1).GetChildAt(0))).Alignment = System.Drawing.ContentAlignment.MiddleLeft;
            ((Telerik.WinControls.UI.CommandBarLabel)(CommandBar.GetChildAt(0).GetChildAt(0).GetChildAt(0).GetChildAt(1).GetChildAt(1).GetChildAt(0))).Name = "lblCurrModel";
            ((Telerik.WinControls.UI.CommandBarDropDownList)(CommandBar.GetChildAt(0).GetChildAt(0).GetChildAt(0).GetChildAt(1).GetChildAt(1).GetChildAt(1))).AutoSize = false;
            ((Telerik.WinControls.UI.CommandBarDropDownList)(CommandBar.GetChildAt(0).GetChildAt(0).GetChildAt(0).GetChildAt(1).GetChildAt(1).GetChildAt(1))).Name = "CurrentModelList";
            ((Telerik.WinControls.UI.RadCommandBarOverflowButton)(CommandBar.GetChildAt(0).GetChildAt(0).GetChildAt(0).GetChildAt(1).GetChildAt(2))).Enabled = false;
            ((Telerik.WinControls.UI.RadCommandBarOverflowButton)(CommandBar.GetChildAt(0).GetChildAt(0).GetChildAt(0).GetChildAt(1).GetChildAt(2))).Visibility = Telerik.WinControls.ElementVisibility.Hidden;
            // 


This code compiles but on running the first line containing all the .GetChildAt calls throws IndexOutOfRange.

Sometimes it deletes the code completely, leaving just this:

            // 
            // CommandBar
            // 
            this.CommandBar.Dock = System.Windows.Forms.DockStyle.Top;
            this.CommandBar.Location = new System.Drawing.Point(0, 25);
            this.CommandBar.Name = "CommandBar";
            this.CommandBar.Size = new System.Drawing.Size(1241, 30);
            this.CommandBar.TabIndex = 4;
            this.CommandBar.ThemeName = "FluentDark";

Any idea what's happening here?

 

Many thanks,

 

John.

Nadya | Tech Support Engineer
Telerik team
 answered on 20 Jul 2021
1 answer
85 views
I've looked but I can't find any way to select a sort on the object?  On a radDropDownList there is a "SortStyle" property.  This is what I am looking for, but on a CommandBarDropdownList.  I can of course sort the data beforehand, but I assumed there would be a SortStyle on it and if so, would rather use the existing functionality if it exists.
Dess | Tech Support Engineer, Principal
Telerik team
 answered on 03 May 2021
3 answers
244 views

I have several panels on a form.  I need to dynamically create a CommandBar (vertical in this case) and place it on a panel.  I then need to reposition this panel and resize the one above so that the entire CommandBar is visible.  I would like to set the size and location of these panels based on the size of the CommandBar, but the Size property does not reflect the size required to display all the added buttons.

The CommandBar in the attached image has 5 button, but only three are visible.  If I knew the size of the CommandBar, I could set the Location of the panel containing the CommandBar and the Height of the panel above it, so that all 5 buttons would be visible.

How can I get the information needed to set the Size and Locations of the two panels as needed to make the dynamically created CommandBar visible.


Todor
Telerik team
 answered on 29 Jan 2021
Narrow your results
Selected tags
Tags
GridView
General Discussions
Scheduler and Reminder
Treeview
Dock
RibbonBar
Themes and Visual Style Builder
ChartView
Calendar, DateTimePicker, TimePicker and Clock
Buttons, RadioButton, CheckBox, etc
DropDownList
ComboBox and ListBox (obsolete as of Q2 2010)
ListView
Chart (obsolete as of Q1 2013)
Form
PageView
MultiColumn ComboBox
TextBox
RichTextEditor
Menu
PropertyGrid
RichTextBox (obsolete as of Q3 2014 SP1)
Panelbar (obsolete as of Q2 2010)
Tabstrip (obsolete as of Q2 2010)
PivotGrid and PivotFieldList
MaskedEditBox
PdfViewer and PdfViewerNavigator
ListControl
Carousel
Diagram, DiagramRibbonBar, DiagramToolBox
Panorama
GanttView
New Product Suggestions
Toolstrip (obsolete as of Q3 2010)
AutoCompleteBox
Label
VirtualGrid
ContextMenu
Spreadsheet
Panel
Visual Studio Extensions
TitleBar
Documentation
SplitContainer
Map
DesktopAlert
ProgressBar
Rotator
TrackBar
MessageBox
CheckedDropDownList
SpinEditor
StatusStrip
CheckedListBox
Wizard
ShapedForm
SyntaxEditor
TextBoxControl
LayoutControl
CollapsiblePanel
Conversational UI, Chat
DateTimePicker
CAB Enabling Kit
TabbedForm
DataEntry
GroupBox
ScrollablePanel
WaitingBar
ImageEditor
ScrollBar
Tools - VSB, Control Spy, Shape Editor
BrowseEditor
DataFilter
ColorDialog
FileDialogs
Gauges (RadialGauge, LinearGauge, BulletGraph)
ApplicationMenu
RangeSelector
CardView
WebCam
BindingNavigator
PopupEditor
RibbonForm
Styling
TaskBoard
Barcode
Callout
ColorBox
PictureBox
VirtualKeyboard
FilterView
Accessibility
DataLayout
NavigationView
ToastNotificationManager
CalculatorDropDown
Localization
TimePicker
ValidationProvider
FontDropDownList
Licensing
BreadCrumb
ButtonTextBox
LocalizationProvider
Dictionary
Overlay
Security
Separator
SparkLine
TreeMap
StepProgressBar
SplashScreen
ToolbarForm
NotifyIcon
Rating
TimeSpanPicker
BarcodeView
Calculator
OfficeNavigationBar
Flyout
TaskbarButton
HeatMap
SlideView
PipsPager
+? more
Top users last month
Dominik
Top achievements
Rank 1
Giuliano
Top achievements
Rank 1
Dominic
Top achievements
Rank 1
Glendys
Top achievements
Rank 1
NoobMaster
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Dominik
Top achievements
Rank 1
Giuliano
Top achievements
Rank 1
Dominic
Top achievements
Rank 1
Glendys
Top achievements
Rank 1
NoobMaster
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?