Thickness.Right 属性

定义

获取或设置边框右边的宽度(以像素为单位)。

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

属性值

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

示例

以下示例演示如何使用可扩展应用程序标记语言 (XAML) 和代码设置 属性的值 Right

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>

适用于