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.

Canvas.Top Attached Property

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

Gets or sets the distance between the top of an element and the top of its parent Canvas.

Namespace:  System.Windows.Controls
Assembly:  System.Windows (in System.Windows.dll)
XMLNS for XAML: Not mapped to an xmlns.

See GetTop, SetTop
<object Canvas.Top="double"/>

Property Value

Type: System.Double
The offset position from the top of a parent Canvas, in logical pixels. The default is 0.

Dependency property identifier field: TopProperty

Negative values are permitted. A negative value places the origin of the element where Canvas.Top is applied off-screen to the top side of the content area.

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

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

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone