Share via


XamlLight.OnDisconnected(UIElement) Method

Definition

This method is automatically called when the XamlLight is no longer in use anywhere on the screen.

This provides an opportunity to safely dispose of resources such as the CompositionLight when they aren't currently required.

OnConnected will be called again if the XamlLight is later used to light any UIElements or Brushes after being disconnected.

protected:
 virtual void OnDisconnected(UIElement ^ oldElement) = OnDisconnected;
void OnDisconnected(UIElement const& oldElement);
protected virtual void OnDisconnected(UIElement oldElement);
function onDisconnected(oldElement)
Protected Overridable Sub OnDisconnected (oldElement As UIElement)

Parameters

oldElement
UIElement

The UIElement that the light is attached to.

Applies to