WindowChrome.CaptionHeight Property

Definition

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

public:
 property double CaptionHeight { double get(); void set(double value); };
public double CaptionHeight { get; set; }
member this.CaptionHeight : double with get, set
Public Property CaptionHeight As Double

Property Value

The height of the caption area.

Remarks

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.

Dependency Property Information

Identifier field CaptionHeightProperty
Metadata properties set to true None

Applies to