Back to Devexpress

BaseLayoutItem.HideToCustomization() Method

windowsforms-devexpress-dot-xtralayout-dot-baselayoutitem-9c18edca.md

latest3.9 KB
Original Source

BaseLayoutItem.HideToCustomization() Method

Hides the item to the Customization Form.

Namespace : DevExpress.XtraLayout

Assembly : DevExpress.XtraLayout.v25.2.dll

NuGet Package : DevExpress.Win.Navigation

Declaration

csharp
public virtual void HideToCustomization()
vb
Public Overridable Sub HideToCustomization

Remarks

The HideToCustomization and BaseLayoutItem.RestoreFromCustomization methods hide or restore the layout item to or from the Customization Form.

Note

When layout items are hidden to the Customization Form, they do not retain their positions in the layout. Use the Visibility property to hide an item and preserve its position.

Empty space items, splitters, labels, and separators are automatically disposed off when they are moved to the Customization Form. You should recreate them.

Example

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.

csharp
private void layoutControlGroup1_CustomButtonClick(object sender, DevExpress.XtraBars.Docking2010.BaseButtonEventArgs e) {
    LayoutControlGroup layoutGroup = sender as LayoutControlGroup;
    if (e.Button.Properties.Caption == "Hide")
        layoutGroup.HideToCustomization();
}
vb
Private Sub layoutControlGroup1_CustomButtonClick(ByVal sender As Object, ByVal e As DevExpress.XtraBars.Docking2010.BaseButtonEventArgs) _
    Handles layoutControlGroup1.CustomButtonClick
    Dim layoutGroup As LayoutControlGroup = TryCast(sender, LayoutControlGroup)
    If e.Button.Properties.Caption = "Hide" Then
        layoutGroup.HideToCustomization()
    End If
End Sub

See Also

IsHidden

RestoreFromCustomization

ContentVisible

Visibility

Hiding

Hidden

Showing

Shown

BaseLayoutItem Class

BaseLayoutItem Members

DevExpress.XtraLayout Namespace