Rect.Width 屬性
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
取得或設定矩形的寬度。
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
屬性值
值,表示矩形的寬度,以像素為單位。 預設值是 0。
例外狀況
指定的值小於 0。
備註
此結構代表 Windows 執行時間 (WinRT) Rect
結構的 .NET 投影。 如需詳細資訊,請參閱 UWP API 參考中的 Rect 。
如需此成員的詳細資訊和範例,請參閱 Rect.Width .NET Framework API 參考。 (範例顯示 WPF 使用方式,而且可能不會直接轉譯為 UWP XAML.)