Window.Left 屬性

定義

取得或設定視窗左邊緣相對於桌面的位置。

C#
[System.ComponentModel.TypeConverter("System.Windows.LengthConverter, PresentationFramework, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, Custom=null")]
public double Left { get; set; }
C#
[System.ComponentModel.TypeConverter("System.Windows.LengthConverter, PresentationFramework, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, Custom=null")]
public double Left { get; set; }

屬性值

視窗左邊緣的位置,以邏輯單位 (1/96 英吋) 計。

屬性

備註

Window最大化或最小化時,這個值代表 的還原點 Window 左邊緣。

這個屬性無法透過樣式來設定。

如果您未指定值, Left 則會設定為系統預設值。 您也可以將 設定 LeftNaN 來指定系統預設值。 NegativeInfinityPositiveInfinity 都不是 的有效 Left 值。

備註

當視窗裝載在瀏覽器中時,您無法設定或取得這個屬性。

相依性屬性資訊

識別碼欄位 LeftProperty
設定為 的中繼資料屬性 true

適用於

產品 版本
.NET Framework 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9, 10

另請參閱