Edit

Share via


AttachedShadowElementContext.AddResource<T>(String, T) Method

Definition

Adds a resource to this instance's resource dictionary with the specified key

public T AddResource<T> (string key, T resource);
member this.AddResource : string * 'T -> 'T
Public Function AddResource(Of T) (key As String, resource As T) As T

Type Parameters

T

The type of the resource being added.

Parameters

key
String

Key to use to lookup the resource later.

resource
T

Object to store within the resource dictionary.

Returns

T

The added resource

Applies to