Updated: July 2008
Gets or sets the value that is used in the target when the value of the source is nullNothingnullptra null reference (Nothing in Visual Basic).
Namespace:
System.Windows.Data
Assembly:
PresentationFramework (in PresentationFramework.dll)
XMLNS for XAML: http://schemas.microsoft.com/winfx/2006/xaml/presentation, http://schemas.microsoft.com/netfx/2007/xaml/presentation
Visual Basic (Declaration)
Public Property TargetNullValue As Object
Dim instance As BindingBase
Dim value As Object
value = instance.TargetNullValue
instance.TargetNullValue = value
public Object TargetNullValue { get; set; }
public:
property Object^ TargetNullValue {
Object^ get ();
void set (Object^ value);
}
public function get TargetNullValue () : Object
public function set TargetNullValue (value : Object)
XAML Property Element Usage
<object>
<object.TargetNullValue>
<Object .../>
</object.TargetNullValue>
</object>
Property Value
Type:
System..::.ObjectThe value that is used in the target when the value of the source is nullNothingnullptra null reference (Nothing in Visual Basic).
The following example binds a TextBox to a property of an object. If the property is nullNothingnullptra null reference (Nothing in Visual Basic), the TextBox displays "please enter a string."
<TextBox Width="150" Text="{Binding Source={StaticResource object2},
Path=PropertyB, BindingGroupName=bindingGroup,
TargetNullValue=please enter a string}"/>
Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
.NET Framework
Supported in: 3.5 SP1, 3.0 SP2
Reference
Date | History | Reason |
|---|
July 2008
| Added topic for new member. |
SP1 feature change.
|