This documentation is archived and is not being maintained.

NullExtension.ProvideValue Method

Provides null to use as a value when you set property values in XAML.

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

public override Object ProvideValue(
	IServiceProvider serviceProvider
You cannot use methods in XAML.


Type: System.IServiceProvider

An object that can provide services for the markup extension.

Return Value

Type: System.Object
A null reference (Nothing in Visual Basic).

This method supports WPF XAML processor implementation, and is not intended to be called directly. The XAML processor implementation uses this method to correctly handle x:Null extension values during object creation.

This implementation does not rely on services that are based on the passed serviceProvider, you can pass null for that parameter. The extension always returns null as a value regardless of the service context and regardless which property is being set.

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, 3.0