RootVisual Property
Collapse the table of content
Expand the table of content

Application.RootVisual Property

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

Gets or sets the main application UI.

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

public UIElement RootVisual { get; set; }

Property Value

Type: System.Windows.UIElement
A UIElement that is the main application UI.

ExceptionCondition
InvalidOperationException

When setting this property, the specified value is not an instance of a class that derives from UIElement.

You can set the value of the RootVisual property only one time from code, although you get its value any number of times.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

Show:
© 2017 Microsoft