Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Key
M11
M12
M21
M22
Tag
Uri
X1
X2
Y1
Y2
Expand Minimize

Canvas.Left

Silverlight

Gets or sets a value that represents the distance between the left side of an element and the left side of its parent Canvas.

<object Canvas.Left="Double"  .../>
value = object["Canvas.Left"]
object["Canvas.Left"] = value

Type: Double

A value that represents the offset position from the left side of a parent Canvas.

This property is read/write. The default value is 0.

Negative values are permitted. A negative value will place the origin of the element where Canvas.Left is applied offscreen to the left side of the content area.

This property is an example of an attached property. Non-Canvas objects can set this property, which can then be read and interpreted by a parent Canvas.

Note the script syntax, which resembles an indexer or array syntax. The ["ownerType.propertyName"] form (with no dot separating this property form and the target object for getting or setting) is necessary to get or set an attached property such as Canvas.Left in script.

The value is interpreted by any immediate parent Canvas. If there are nested canvas elements, values for Canvas.Left that do not come from immediate child elements are ignored. A Canvas can itself have a Canvas.Left value, but the value does not apply to itself. Instead, it is interpreted by any parent Canvas, as in the nested scenario mentioned previously.

Canvas.Left and Canvas.Top values on the root canvas are ignored and are not used for positioning by the Silverlight plug-in's content area.

Community Additions

ADD
Show:
© 2015 Microsoft