XamlLight.AddTargetElement(String, UIElement) Method

Definition

Sets a UIElement as a target of a XamlLight.

Equivalent WinUI method: Microsoft.UI.Xaml.Media.XamlLight.AddTargetElement.

public:
 static void AddTargetElement(Platform::String ^ lightId, UIElement ^ element);
 static void AddTargetElement(winrt::hstring const & lightId, UIElement const & element);
public static void AddTargetElement(string lightId, UIElement element);
function addTargetElement(lightId, element)
Public Shared Sub AddTargetElement (lightId As String, element As UIElement)

Parameters

lightId
String

The identifier for the XamlLight that should target the UIElement.

element
UIElement

The UIElement that the light should target.

Applies to