Freigeben über


Margin

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

Gets or sets the outer margin of a UIElement.

<object Margin="uniform"/>
- or -
<object Margin="left&Right,top&Bottom"/>
- or -
<object Margin="left,top,right,bottom"/>
value = object.Margin
object.Margin = value

Property Value

Type: Thickness

An object that defines the four measurements of the margin.

This property is read/write. The default is an empty object, which evaluates to all values as 0.

XAML Values

See Thickness.

Managed Equivalent

Margin

Remarks

Margin is available only as a property for the JavaScript API if the client is Silverlight version 2.

Version Information

Silverlight 2