AttachablePropertyServices.SetProperty Method (Object, AttachableMemberIdentifier, Object)

.NET Framework (current version)
 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Sets a value for the specified attachable property in the specified store.

Namespace:   System.Xaml
Assembly:  System.Xaml (in System.Xaml.dll)

public static void SetProperty(
	object instance,
	AttachableMemberIdentifier name,
	object value
)

Parameters

instance
Type: System.Object

A specific attachable property store that implements IAttachedPropertyStore; or any non-null object to use a static default attachable property store.

name
Type: System.Xaml.AttachableMemberIdentifier

The identifier of the attachable property entry for which to set a value.

value
Type: System.Object

The value to set.

Exception Condition
InvalidOperationException

A value could not be set in the store.

ArgumentNullException

name is null.

.NET Framework
Available since 4.0
Return to top
Show: