Share via


AdornerResources.TryFindResource 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 TryFindResource ( _
    key As ResourceKey _
) As Object
public static Object TryFindResource(
    ResourceKey key
)
public:
static Object^ TryFindResource(
    ResourceKey^ key
)
static member TryFindResource : 
        key:ResourceKey -> Object 
public static function TryFindResource(
    key : ResourceKey
) : Object

Parameters

Return Value

Type: System.Object
The resource if it exists.
-or-
nulla null reference (Nothing in Visual Basic) if the specified resource does not exist.

Exceptions

Exception Condition
ArgumentNullException

key is nulla null reference (Nothing in Visual Basic).

.NET Framework Security

See Also

Reference

AdornerResources Class

Microsoft.Windows.Design.Interaction Namespace

Other Resources

WPF Designer Extensibility

Adorner Architecture

Creating Custom Adorners