Rect.Width 屬性

定義

取得或設定矩形的寬度。

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

屬性值

Double

值,表示矩形的寬度(以圖元為單位)。 預設值是 0。

例外狀況

指定的值小於 0。

備註

此結構代表 Windows 執行階段 (WinRT) 結構的 .NET 投影 Rect 。 如需詳細資訊,請參閱 UWP API 參考中的 Rect

如需此成員的詳細資訊和範例,請參閱 Rect.Width .NET FRAMEWORK API 參考中的。 (範例會示範 WPF 的使用方式,而且可能無法直接轉譯成 UWP XAML。 )

適用於