AttachedShadowElementContext.TryGetResource<T>(String, T) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Retrieves a resource with the specified key and type if it exists
public bool TryGetResource<T> (string key, out T resource);
member this.TryGetResource : string * 'T -> bool
Public Function TryGetResource(Of T) (key As String, ByRef resource As T) As Boolean
Type Parameters
- T
The type of the resource being retrieved.
Parameters
- key
- String
Key to use to lookup the resource.
- resource
- T
Object to retrieved from the resource dictionary or default value.
Returns
True if the resource exists, false otherwise