Back to Devexpress

GridSplitContainer.Horizontal Property

windowsforms-devexpress-dot-xtragrid-dot-gridsplitcontainer-785b232f.md

latest3.7 KB
Original Source

GridSplitContainer.Horizontal Property

Gets or sets whether a splitter divides the container into two horizontally or vertically arranged regions.

Namespace : DevExpress.XtraGrid

Assembly : DevExpress.XtraGrid.v25.2.dll

NuGet Packages : DevExpress.Win.Grid, DevExpress.Win.Navigation

Declaration

csharp
[DefaultValue(false)]
[DXCategory("Split")]
public override bool Horizontal { get; set; }
vb
<DefaultValue(False)>
<DXCategory("Split")>
Public Overrides Property Horizontal As Boolean

Property Value

TypeDefaultDescription
Booleanfalse

true if a splitter divides the container into two horizontally arranged regions; otherwise, false.

|

Remarks

Horizontal Split:

Vertical Split

While a Split View is active, changing the Horizontal property results in redisplaying the Split View. As such, the following events fire:

  1. GridSplitContainer.SplitViewHidden - Fires when the old Split View is destroyed.
  2. GridSplitContainer.SplitViewCreated - Fires when a new Split View is created, but before it is displayed.
  3. GridSplitContainer.SplitViewShown - Fires after the new Split View is displayed.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the Horizontal property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

winforms-grid-split-presentation/CS/Form1.cs#L55

csharp
GridSplitContainer gsc = sender as GridSplitContainer;
if (!gsc.Horizontal)
    gsc.SplitChildGrid.UseEmbeddedNavigator = true;

winforms-grid-split-presentation/VB/Form1.vb#L57

vb
Dim gsc As GridSplitContainer = TryCast(sender, GridSplitContainer)
If (Not gsc.Horizontal) Then
    gsc.SplitChildGrid.UseEmbeddedNavigator = True

See Also

ShowSplitView()

SplitterPosition

ShowSplitItem

GridSplitContainer Class

GridSplitContainer Members

DevExpress.XtraGrid Namespace