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附加属性设置为元素并将其设置为trueTo 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 None

适用于