HwndSourceParameters.Height 属性

定义

获取或设置一个值,该值指示窗口的高度。

public:
 property int Height { int get(); void set(int value); };
public int Height { get; set; }
member this.Height : int with get, set
Public Property Height As Integer

属性值

窗口的高度(以设备像素为单位)。 默认值为 1。

注解

与大多数采用矩形屏幕区域度量Windows Presentation Foundation(WPF)的方法不同,你以设备像素为单位指定此窗口大小,而不是典型的独立于设备的单位。 如果需要将窗口大小调整为其内容,请设置为 SizeToContenttrue

不要设置为 Height 0(零)。 这样做会导致呈现时产生显著的性能损失。

适用于

另请参阅