Application.RootVisual Property

May 11, 2014

Gets or sets the main application UI.

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

'Declaration
Public Property RootVisual As UIElement

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:
© 2014 Microsoft