AdornerResources.FindResource Method
Locates a resource with the specified key.
Namespace: Microsoft.Windows.Design.Interaction
Assembly: Microsoft.Windows.Design.Interaction (in Microsoft.Windows.Design.Interaction.dll)
Syntax
'Declaration
Public Shared Function FindResource ( _
key As ResourceKey _
) As Object
public static Object FindResource(
ResourceKey key
)
public:
static Object^ FindResource(
ResourceKey^ key
)
static member FindResource :
key:ResourceKey -> Object
public static function FindResource(
key : ResourceKey
) : Object
Parameters
- key
Type: System.Windows.ResourceKey
The resource key to find.
Return Value
Type: System.Object
The resource that corresponds with key.
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | key is nulla null reference (Nothing in Visual Basic). |
ResourceReferenceKeyNotFoundException | key does not have a resource. |
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.
See Also
Reference
Microsoft.Windows.Design.Interaction Namespace