共用方式為


Thickness.Left 屬性

定義

取得或設定週框左邊的寬度 (以像素為單位)。

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

屬性值

Double,代表這個 Thickness 執行個體之周框左邊的寬度 (以像素為單位)。 像素等於 1/96 英吋。 預設值是 0。

範例

下列範例示範如何使用 Extensible Application Markup Language (XAML) 和程式碼來設定 屬性的值 Left

myBorder2 = new Border();
myBorder2.BorderBrush = Brushes.SteelBlue;
myBorder2.Width = 400;
myBorder2.Height = 400;
myThickness = new Thickness();
myThickness.Bottom = 5;
myThickness.Left = 10;
myThickness.Right = 15;
myThickness.Top = 20;
myBorder2.BorderThickness = myThickness;
Dim myBorder2 As New Border()
myBorder2.BorderBrush = Brushes.SteelBlue
myBorder2.Width = 400
myBorder2.Height = 400
Dim myThickness As New Thickness()
myThickness.Bottom = 5
myThickness.Left = 10
myThickness.Right = 15
myThickness.Top = 20
myBorder2.BorderThickness = myThickness
<Border BorderBrush="SteelBlue" Width="400" Height="400" Canvas.Left="100" Canvas.Top="100">
  <Border.BorderThickness>
    10,20,15,5
  </Border.BorderThickness>
</Border>

適用於