Export (0) Print
Expand All

WindowChrome.CaptionHeight Property

.NET Framework 4

Gets or sets the height of the caption area at the top of a window.

Namespace:  Microsoft.Windows.Shell
Assembly:  Microsoft.Windows.Shell (in Microsoft.Windows.Shell.dll)

public double CaptionHeight { get; set; }

Property Value

Type: System.Double
The height of the caption area.

Identifier field

CaptionHeightProperty

Metadata properties set to true

None

Set the CaptionHeight property to specify the area at the top of the window that enables the system behaviors typically associated with the title bar. These behaviors include double-click to maximize the window, right-click to open the system menu, and click-and-drag to move the window. This property can be set to any non-negative double value.

The area defined by the CaptionHeight property starts at the bottom edge of the top resize border and extends downward the specified amount. It spans the width of the window inside the right and left resize borders. This area does not have any visual elements associated with it; it is only used to define the region that responds to the title bar behaviors. By default, the parts of any visual elements that are within the caption area of the window are not interactive. To enable interactive elements in the caption area, attach the IsHitTestVisibleInChrome attached property to the element and set it to true.

Show:
© 2014 Microsoft