Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
SplitterRectangle Property

SplitContainer.SplitterRectangle Property

Gets the size and location of the splitter relative to the SplitContainer.

Namespace:  System.Windows.Forms
Assembly:  System.Windows.Forms (in System.Windows.Forms.dll)

[BrowsableAttribute(false)]
public Rectangle SplitterRectangle { get; }

Property Value

Type: System.Drawing.Rectangle
A System.Drawing.Rectangle that specifies the size and location of the splitter relative to the SplitContainer.

Use SplitterRectangle to get the width and height of the splitter relative to the SplitContainer. The OnKeyDown, OnKeyUp, OnMouseDown, OnMouseUp, and OnMouseMove event handlers draw the SplitterRectangle to show the current position of the splitter while it is moving.

The meaning of the SplitterRectangle values vary depending on the Orientation. The output of SplitterRectangle is in the format {X, Y, Width, Height}. The following table shows the meaning of the SplitterRectangle values for vertical and horizontal splitters.

Dimension

Vertical Splitter

Horizontal Splitter

X

The distance in pixels of the splitter from the left edge of the SplitContainer.

This value is always 0 for a horizontal splitter, indicating that the splitter is flush with the left edge of the SplitContainer.

Y

This value is always 0 for a vertical splitter, indicating that the splitter is flush with the top edge of the SplitContainer.

The distance in pixels of the splitter from the top edge of the SplitContainer.

Width

The width of the splitter.

The height of the splitter, which is equivalent to the height of the SplitContainer control.

Height

The height of the splitter, which is equivalent to the height of the SplitContainer control.

The width of the splitter.

.NET Framework

Supported in: 4, 3.5, 3.0, 2.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Community Additions

ADD
Show:
© 2015 Microsoft