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.5.2, 4.5.1, 4.5, 4, 3.5, 3.0, 2.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

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

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft