UIElement.XamlRoot Property

Definition

Gets or sets the XamlRoot in which this element is being viewed.

C#
public XamlRoot XamlRoot { get; set; }

Property Value

The XamlRoot in which this element is being viewed. The default is null.

Remarks

When a UIElement is first created, XamlRoot returns null. After it's parented to a live XAML object, it will return the same XamlRoot object as its parent. A common scenario for XamlRoot to be null is if you access the property from the constructor of your app.

Applies to

Proizvod Verzije
Windows App SDK 0.8, 1.0, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6