Share via


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

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

See Also

Reference

AdornerResources Class

Microsoft.Windows.Design.Interaction Namespace

Other Resources

WPF Designer Extensibility

Adorner Architecture

Creating Custom Adorners