WindowChrome.CaptionHeight WindowChrome.CaptionHeight WindowChrome.CaptionHeight WindowChrome.CaptionHeight Property

定义

获取或设置窗口顶部标题区域的高度。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

属性值

标题区域的高度。The height of the caption area.

注解

CaptionHeight设置属性以指定窗口顶部的区域, 该区域启用通常与标题栏关联的系统行为。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.

CaptionHeight属性定义的区域从顶部调整大小边框的下边缘开始, 并向下扩展指定的量。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. 若要启用标题区中的交互式元素, 请IsHitTestVisibleInChrome将附加属性附加到元素, 并将true其设置为。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
元数据属性设置为trueMetadata properties set to true NoneNone

适用于