BaseLayoutItem.Visibility Property

Gets or sets whether the layout item is visible within the LayoutControl in regular mode (when layout customization is not performed) and in customization mode.

Namespace: DevExpress.XtraLayout

Assembly: DevExpress.XtraLayout.v20.1.dll

Declaration

[XtraSerializableProperty]
[DefaultValue(LayoutVisibility.Always)]
[DXCategory("Behavior")]
public LayoutVisibility Visibility { get; set; }
<XtraSerializableProperty>
<DefaultValue(LayoutVisibility.Always)>
<DXCategory("Behavior")>
Public Property Visibility As LayoutVisibility

Property Value

Type Default Description
LayoutVisibility

Always

A LayoutVisibility value.

Remarks

Layout items that are hidden from the LayoutControl using the Visibility property are not accessible via the LayoutControl's hidden item collection (LayoutControl.HiddenItems) and so they are not listed in the Customization Form.

To hide a layout item at design time and make it accessible via the Customization Form at runtime, drag the item to the Customization Form. To hide a layout item in code and make it accessible via the Customization Form, use the BaseLayoutItem.HideToCustomization method. The BaseLayoutItem.RestoreFromCustomization method allows you to restore the layout item.

A layout item hidden via the Visibility property retains its position within the LayoutControl. This item is collapsed to a 1 pixel-width transparent line. Two or more adjacent hidden items are collapsed to a 2 pixel-width transparent line. When a hidden item's visibility is restored, it's displayed at its previous position.

Layout items hidden via the BaseLayoutItem.HideToCustomization method do not retain their positions in the layout.

See Also