Поделиться через


Control.BorderThickness Property

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Gets or sets the border thickness of a control.

Namespace:  System.Windows.Controls
Assembly:  System.Windows (in System.Windows.dll)

Syntax

'Declaration
Public Property BorderThickness As Thickness
public Thickness BorderThickness { get; set; }
<control BorderThickness="uniform"/>
- or -
<control BorderThickness="left&right,top&bottom"/>
- or -
<control BorderThickness="left,top,right,bottom"/>

XAML Values

  • In the XAML syntaxes shown above, you can also use a space rather than a comma as the delimiter between values.

  • See Remarks for additional notes about value constraints.

Property Value

Type: System.Windows.Thickness
A thickness value; the default is a thickness of 0 on all four sides.

Remarks

Dependency property identifier field: BorderThicknessProperty

This property only affects a control whose template uses the BorderThickness property as a parameter. On other controls, this property has no impact.

Non-integral values of a Thickness for BorderThickness are technically permitted, but should generally be avoided. Non-integral values will introduce subpixel rendering, which can possibly result in antialiasing artifacts.

Version Information

Silverlight

Supported in: 5, 4, 3

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1, Windows Phone OS 7.0

Platforms

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.