WindowChrome.CaptionHeight Property

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 Property CaptionHeight As Double
public double CaptionHeight { get; set; }
property double CaptionHeight {
    double get ();
    void set (double value);
member CaptionHeight : float with get, set
function get CaptionHeight () : double
function set CaptionHeight (value : double)

Property Value

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

Dependency Property Information

Identifier field


Metadata properties set to true



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.

.NET Framework Security

See Also


WindowChrome Class

Microsoft.Windows.Shell Namespace