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

一个 Double,表示 Thickness 的这一实例的边框左侧的宽度(以像素为单位)。 一像素等于 1/96 英寸。 默认值为 0。

示例

以下示例演示如何使用可扩展应用程序标记语言 (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>

适用于