This documentation is archived and is not being maintained.

IProvideValueTarget.TargetObject Property

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.

Important noteImportant

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

Supported in: 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Show: