HwndSourceParameters.Width 屬性

定義

取得或設定值,這個值表示視窗的寬度。

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

屬性值

Int32

視窗寬度 (以裝置像素為單位)。 預設值為 1。

備註

不同于在 WPF) Windows Presentation Foundation (採用矩形螢幕區域量值的大部分方法,您會以裝置圖元指定此視窗的大小,而不是一般的裝置獨立單位。 如果您需要將視窗的大小調整為其內容,請將 設定 SizeToContenttrue

請勿將 設定 Width 為 0 (零) 。 這麼做會導致轉譯效能大幅降低。

適用於

另請參閱