XamlLight.OnConnected(UIElement) 方法

定義

當 XamlLight 第一次在畫面上使用時,或在先前中斷連線之後,再再次使用時,會自動呼叫這個方法。

這可讓您只在需要時建立資源,例如 CompositionLight。

當 XamlLight 不再用來亮起任何 UIElement 或 Brush 時,將會呼叫OnDisconnected

protected:
 virtual void OnConnected(UIElement ^ newElement) = OnConnected;
void OnConnected(UIElement const& newElement);
protected virtual void OnConnected(UIElement newElement);
function onConnected(newElement)
Protected Overridable Sub OnConnected (newElement As UIElement)

參數

newElement
UIElement

光線所連接的 UIElement

適用於