HwndSourceParameters.Width 屬性
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
取得或設定一個表示視窗寬度的值。
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
屬性值
視窗寬度,以裝置像素為單位。 預設值是 1。
備註
與大多數在 Windows Presentation Foundation(WPF)中測量矩形螢幕區域的方法不同,你指定這個視窗的大小是裝置像素,而非通常的裝置無關單位。 如果你需要將視窗大小調整到內容,請設 SizeToContent 為 true。
不要設 Width 為 0(0)。 若如此,渲染效能會受到嚴重損失。