LayoutGroup.CustomButtonClick Event

Fires on a regular (push) custom header button click.

Namespace: DevExpress.XtraLayout

Assembly: DevExpress.XtraLayout.v20.1.dll

Declaration

[DXCategory("Behavior")]
public event BaseButtonEventHandler CustomButtonClick
<DXCategory("Behavior")>
Public Event CustomButtonClick As BaseButtonEventHandler

Event Data

The CustomButtonClick event's data class is DevExpress.XtraBars.Docking2010.BaseButtonEventArgs.

Remarks

The CustomButtonClick event is fired for custom header buttons of the regular (push) type only. Check buttons and group radio buttons do not raise this event. The button type is specified by the IButtonProperties.Style and IButtonProperties.GroupIndex properties.

Examples

The code below handles the LayoutGroup.CustomButtonClick event to hide the layout group with a click on a button in its header. To add buttons to the header, use the CustomHeaderButtons collection.

private void layoutControlGroup1_CustomButtonClick(object sender, DevExpress.XtraBars.Docking2010.BaseButtonEventArgs e) {
    LayoutControlGroup layoutGroup = sender as LayoutControlGroup;
    if (e.Button.Properties.Caption == "Hide")
        layoutGroup.HideToCustomization();
}
See Also