WindowsUI Button Panel Devex

The WindowsUI Button Panel is a button container which is painted in windows 10 flat style, windowsUIButtonPanel class is used to represent the panels.

To modify the properties of the button(s) in the panel, the edit button link could be invoked using the smart tag.
The property grid on the dialog's right allows you to modify appearance and behavior settings for any element added. For instance, you can utilize the Style property for a button to specify whether it should act as a regular push button or as a check button. See the image below.


To populate a panel in code, use the WindowsUIButtonPanel.Buttons collection. This collection accepts child elements of the WindowsUIButton and WindowsUISeparator classes. A code sample below illustrates the example.

WindowsUIButton checkBtn1 = new WindowsUIButton() {
    Caption = "Left",
    Style = ButtonStyle.CheckButton,
    ImageUri = "AlignLeft;Size16x16;GrayScaled",
    GroupIndex = 1
};
WindowsUIButton checkBtn2 = new WindowsUIButton() {
    Caption = "Center",
    Style = ButtonStyle.CheckButton,
    ImageUri = "AlignCenter;Size16x16;GrayScaled",
    GroupIndex = 1
};
WindowsUIButton checkBtn3 = new WindowsUIButton() {
    Caption = "Right",
    Style = ButtonStyle.CheckButton,
    ImageUri = "AlignRigh;Size16x16;GrayScaledt",
    GroupIndex = 1
};
WindowsUIButton pushBtn1 = new WindowsUIButton() {
    Caption = "Users",
    Style = ButtonStyle.PushButton,
    ImageUri = "Employee;Size16x16;GrayScaled" 
};
windowsUIButtonPanel1.Buttons.AddRange(new WindowsUIButton[] { checkBtn1, checkBtn2, checkBtn3, pushBtn1 });
windowsUIButtonPanel1.Buttons.Insert(3, new WindowsUISeparator());

Important properties

If you wish to show colored images in button you must set AllowGlyphSkining to false.
Tag property of the button is used to identify a button in a collection. 
Image property is used to show image in the button.
Set Style of the button to used as push button or check button.

The following code demonstrates the click of different buttons of Devexpress windows UI button panel

private void windowsUIButtonPanel1_ButtonClick(object sender, DevExpress.XtraBars.Docking2010.ButtonEventArgs e)
{
            DevExpress.XtraBars.Docking2010.WindowsUIButton btn = e.Button as DevExpress.XtraBars.Docking2010.WindowsUIButton;
            if (btn.Tag.ToString() == "Save")
            {
                // code to save
            }
           if (btn.Tag.ToString() == "update")
            {
               // code to update
            }
}

For further question please mail: brainstormiert@gmail.com