Searches for a resource with the specified key, and will throw an exception if the requested resource is not found.
Assembly: PresentationFramework (in PresentationFramework.dll)
If you call this method for a key that cannot be found, an exception is thrown. If you do not want to handle exceptions for this case, you should instead call TryFindResource. TryFindResource returns null when no resource is found, and does not throw an exception.
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 resource 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.
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.