IProvideValueTarget.TargetObject Property


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

Gets the target object being reported.

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

object TargetObject { get; }

Property Value

Type: System.Object

The target object being reported.

The value returned by TargetObject is the actual reference, not a type system identifier or other identifier. The value can also be null; see Remarks in IProvideValueTarget.


When using the service, it is particularly important not to modify the object referenced by the TargetObject property, or other objects referenced by that object as properties that are not specifically the value-conversion case you are handling. For WPF specifically, changing the target object could cause unexpected changes that would invalidate the WPF property system.

.NET Framework
Available since 3.0
Available since 5.0
Return to top