AttachablePropertyServices.TryGetProperty<T> Method (Object, AttachableMemberIdentifier, T)

.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.

Attempts to get a value for the specified attachable property in the specified store, returning a generic output form. Does not throw an exception if the specific attachable property does not exist in the store.

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

public static bool TryGetProperty<T>(
	object instance,
	AttachableMemberIdentifier name,
	out T value
)

Parameters

instance
Type: System.Object

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

name
Type: System.Xaml.AttachableMemberIdentifier

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

value
Type: T

Out parameter. When this method returns, contains the destination object for the value if name exists in the store and has a value.

Return Value

Type: System.Boolean

true if an attachable property entry for name was found in the store and a value was posted to value; otherwise, false.

Type Parameters

T

The expected type of the output.

.NET Framework
Available since 4.0
Return to top
Show: