Windows apps
Collapse the table of content
Expand the table of content
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

Thickness.Left Property


Gets or sets the width, in pixels, of the left side of the bounding rectangle.

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

public double Left { get; set; }

Property Value

Type: System.Double

A Double that represents the width, in pixels, of the left side of the bounding rectangle for this instance of Thickness. a pixel is equal to 1/96 on an inch. The default is 0.

The following example shows how to set the value of the Left property by using Extensible Application Markup Language (XAML) and code.

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;
<Border BorderBrush="SteelBlue" Width="400" Height="400" Canvas.Left="100" Canvas.Top="100">

.NET Framework
Available since 3.0
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Return to top
© 2016 Microsoft