$99 VS $1000+. UI Control for ASP.NET AJAX(contains chart and gridview).
RibbonBar Control for Windows Forms
Create innovative user interfaces and build Office 2007 and 2010 ribbon bar design
Home > WinForms UI Controls > User Manual > Add and Customize Elements in C# in C#

Add and Customize Elements to RibbonBar group in C#.NET

KetticRibbonBar control offers the ribbon groups to include both button groups and elements. The button groups are able to store button groups and elements in a hierarchical structure and allow the users to add, remove, and customize the elements by using C# code. In this article, we are going through how to add and customize the elements programmatically.

Customization of Button Groups of RibbinBar Control

KetticRibbonBar control allows the users to add and customize the button groups for ribbon bar by using the KetticRibbonBarButtonGroup object. There are two methods available to add button groups or elements to a button group, KetticRibbonBarButtonGroup.Items.Add or KetticRibbonBarButtonGroup.Items.AddRange. To customize the button groups, we can modify these properties available, Orientation, DisplayBorder, and MinSize. The Orientation property is used to set the direction of the elements in the button group. The DisplayBorder property is used to enable the border of the button elements. MinSize property is used to minimize the size of the button group.

RibbonBar Elements Adding in C#.NET

KetticRibbonBar control is capable of adding various elements to KetticRibbonBarGroup.Items or KetticRibbonBarButtonGroup.Items collection using C# code for .NET project, including, button elements, Check box elements, Drop-down button elements, Repeat button elements, Split button elements, Toggle button elements, and Image button elements.

Properties for Customizing Button Elements in C#

KetticRibbonBar control uses the button elements to add buttons to ribbon bar and these buttons are able to show text and image on it. The following are the properties for customizing the button elements.
  • ShownStyle, this property is used to customize the appearance of button to show Text, Image, or ImageAndText.
  • Text, this property is used to set the text that will be shown on the button in ribbon bar.
  • Image, ImageIndex, and ImageKey, these properties are used to set the image that will be shown on the button in ribbon.
  • TextImagePosition, this property is able to control the relative position between the text and the image when the users show both image and text on the button.
  • ImageAlignment, this property is able to align the image shown on the button in ribbon.
  • TextAlignment, this property is able to customize the alignment of the image shown on the button in ribbon.
  • TextOrientation, this property is used to display the text in Horizontal direction or Vertical direction on the button in ribbon.

Check Box Elements Customizing in C#.NET

KetticRibbonBar control provides the check box element to add check box with a caption to ribbon bar. It shares all the properties for customizing button elements, including ShownStyle, Text, Image, ImageIndex, and ImageKey, TextImagePosition, ImageAlignment, TextAlignment, and TextOrientation. In addition, there are four more properties listed as below for customizing the KetticCheckBoxElement object.
  • CheckAlignment, this property is used to adjust the check box alignment for the RibbonBar control
  • IsChecked, this property is able to customize the check box initial state when setting the IsThreeState property to False.
  • ToggleState, this property is able to customize the check box initial state when setting the IsThreeState property to True
  • IsThreeState, this property is used to display the indeterminate (gray) state in the check box

Customization of Dropdown Button Elements

KetticRibbonBar uses drop down button element to add a drop-down items list. It shares all the properties for customizing button elements, including ShownStyle, Text, Image, ImageIndex, and ImageKey, TextImagePosition, ImageAlignment, TextAlignment, and TextOrientation. In addition, there are two more properties listed as below for customizing the KetticDropDownButtonElement.
  • ClickMode, this property is used to specify the time that the button Click event will be fired.
  • Items collection, this property is used to specify the items that will be shown in the drop down list.

Repeat Button Elements Customization in C#.NET

KetticRibbonBar uses the repeat button element to add a button to repeatedly fire the Click event. It shares all the properties for customizing button elements, including ShownStyle, Text, Image, ImageIndex, and ImageKey, TextImagePosition, ImageAlignment, TextAlignment, and TextOrientation. In addition, there are two more properties listed as below for customizing the KetticRepeatButtonElement object.
  • Delay, this property is used to set the interval between the first Click event and the second Click event being fired.
  • Interval, this property is used to set interval between two Click events apart from the first two.

Customize Split Button Elements

KetticRibbonBar uses the split button element to add a menu item button to display the items when the arrow of the button is clicked. It shares all the properties for customizing button elements, including ShownStyle, Text, Image, ImageIndex, and ImageKey, TextImagePosition, ImageAlignment, TextAlignment, and TextOrientation. In addition, there are two more properties listed as below for customizing the KetticSplitButtonElement object.
  • ClickMode, this property is used to specify the time that the button Click event will be fired.
  • Items collection, this property is used to specify the items that will be shown in the drop down menu.

Customize Toggle Button Elements

KetticRibbonBar uses the toggle button element to add a button to toggle between two states. It shares all the properties for customizing button elements, including ShownStyle, Text, Image, ImageIndex, and ImageKey, TextImagePosition, ImageAlignment, TextAlignment, and TextOrientation. In addition, there is one more property listed as below for customizing the KetticToggleButtonElement object.
  • ToggleState, this property is used to customize the button initial state.

Customize Image Button Elements

KetticRibbonBar uses the image button element to add a button to show multiple images. It shares all the properties for customizing button elements, including ShownStyle, Text, Image, ImageIndex, and ImageKey, TextImagePosition, ImageAlignment, TextAlignment, and TextOrientation. In addition, there are two more properties listed as below for customizing the KetticImageButtonElement object.
  • ImageClicked, ImageIndexClicked, and ImageKeyClicked, these properties are able to customize the image shown on the button clicked.
  • ImageHovered, ImageIndexHovered, and ImageKeyHovered, these properties are used to customize the image shown on a button hovered.
UI Controlsfor Windows Forms
.NET WinForms UI Overview.NET WinForms UI Features.NET WinForms UI GuideC# WinForms UI DesignVB.NET WinForms UI Design
WinForms UI Controls