FrameworkContentElement::TryFindResource Method (Object^)
.NET Framework (current version)
Searches for a resource with the specified key, and returns that resource if found.
Assembly: PresentationFramework (in PresentationFramework.dll)
Parameters
- resourceKey
-
Type:
System::Object^
Key identifier of the resource to be found.
If the resource is not found on the calling element, the parent tree is searched using the logical tree, in the same way that the tree would be searched if a dynamic resource reference were requested by key at run-time.
Typically you would immediately cast the return value to the type of the property that you were attempting to set with the returned resource value.
The FindResource method has similar behavior, except that it will throw an exception in the case of not finding a resource with the provided key.
.NET Framework
Available since 3.0
Available since 3.0
Show: