Canvas.Top attached property
Gets or sets the distance between the top of an element and the top of its parent Canvas.
<object Canvas.Top="offset"/>
XAML Values
- offset
-
The vertical offset between the top edge of the parent Canvas, and where the target element should be placed. You typically specify positive integer numbers. Non-integer Double values are allowed but can potentially cause subpixel rendering issues; see UseLayoutRounding.
Remarks
Canvas.Top is an attached property, which supports a XAML usage. When setting this property in code, use SetTop instead. When getting this property in code, use GetTop instead. In code usages, the target parameter is the object where the attached property value is set. Another way to get or set the value in code is to use the dependency property system, calling either GetValue or SetValue and passing TopProperty as the dependency property identifier.
A Canvas.Top value is interpreted by the most immediate parent Canvas element from where the value is set. The value is used along with Canvas.Left to specify the layout characteristics of each child element of a Canvas.
Requirements (Windows 10 device family)
|
API contract | |
|---|---|
|
Namespace |
Windows.UI.Xaml.Controls |
|
Metadata |
Requirements (Windows 8.x and Windows Phone 8.x)
|
Minimum supported client |
Windows 8 |
|---|---|
|
Minimum supported server |
Windows Server 2012 |
|
Minimum supported phone |
Windows Phone 8.1 [Windows Runtime apps only] |
|
Namespace |
Windows.UI.Xaml.Controls |
|
Metadata |
|
See also