Windows apps
Collapse the table of content
Expand the table of content
Information
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.

Window.Top Property

 

Gets or sets the position of the window's top edge, in relation to the desktop.

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

[TypeConverterAttribute("System.Windows.LengthConverter, PresentationFramework, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, Custom=null")]
public double Top { get; set; }

Property Value

Type: System.Double

The position of the window's top, in logical units (1/96").

When the Window is maximized or minimized, this value represents the top edge of the restore point for the Window.

This property cannot be set through a style.

If you do not specify a value, Top is set to the system default value. You can also specify the system default value by setting Top to NaN. Neither NegativeInfinity nor PositiveInfinity is a valid value for Top.

System_CAPS_noteNote

You cannot set or get this property when a window is hosted in a browser.

Identifier field

TopProperty

Metadata properties set to true

None

.NET Framework
Available since 3.0
Silverlight
Available since 4.0
Return to top
Show:
© 2017 Microsoft