Share via


AdornerResources.CreateResourceKey Method

Creates a resource key for the specified type and member name.

Namespace:  Microsoft.Windows.Design.Interaction
Assembly:  Microsoft.Windows.Design.Interaction (in Microsoft.Windows.Design.Interaction.dll)

Syntax

'Declaration
Public Shared Function CreateResourceKey ( _
    owningType As Type, _
    publicMember As String _
) As ResourceKey
public static ResourceKey CreateResourceKey(
    Type owningType,
    string publicMember
)
public:
static ResourceKey^ CreateResourceKey(
    Type^ owningType, 
    String^ publicMember
)
static member CreateResourceKey : 
        owningType:Type * 
        publicMember:string -> ResourceKey 
public static function CreateResourceKey(
    owningType : Type, 
    publicMember : String
) : ResourceKey

Parameters

  • owningType
    Type: System.Type
    The type that owns this resource.
  • publicMember
    Type: System.String
    The name of the public static member that exposes this resource.

Return Value

Type: System.Windows.ResourceKey
A new resource key.

Exceptions

Exception Condition
ArgumentNullException

owningType or publicMember is nulla null reference (Nothing in Visual Basic).

Remarks

Once a resource key is created, call the RegisterResources method to register a resource callback that can provide resources for the key.

.NET Framework Security

See Also

Reference

AdornerResources Class

Microsoft.Windows.Design.Interaction Namespace

Other Resources

WPF Designer Extensibility

Adorner Architecture

Creating Custom Adorners