Share via


XamlMarkupHelper.UnloadObject(DependencyObject) Method

Definition

Unloads an element from the XAML visual tree that was loaded by x:Load.

public:
 static void UnloadObject(DependencyObject ^ element);
 static void UnloadObject(DependencyObject const& element);
public static void UnloadObject(DependencyObject element);
function unloadObject(element)
Public Shared Sub UnloadObject (element As DependencyObject)

Parameters

element
DependencyObject

The element to unload.

Remarks

This method supports functionality provided by the x:Load attribute. Calling this method with an element that is not marked with the x:Load attribute will cause an error.

For more information and examples, see Unloading elements in the x:Load attribute page.

Applies to

See also