Редагувати

Поділитися через


NullExtension.ProvideValue(IServiceProvider) Method

Definition

Provides null to use as a value as the output of this markup extension.

public:
 override System::Object ^ ProvideValue(IServiceProvider ^ serviceProvider);
public override object ProvideValue (IServiceProvider serviceProvider);
override this.ProvideValue : IServiceProvider -> obj
Public Overrides Function ProvideValue (serviceProvider As IServiceProvider) As Object

Parameters

serviceProvider
IServiceProvider

An object that can provide services for the markup extension implementation.

Returns

A null reference.

Remarks

This method supports XAML processor implementations, and is not intended to be called directly. A XAML processor implementation uses this method when it creates object graphs that include an x:Null extension usage. This relies on general behavior for XAML processors when they process any MarkupExtension and call its ProvideValue implementation.

This implementation does not rely on services that are based on the passed serviceProvider. It always returns a null reference regardless of context. In the .NET Framework XAML Services implementation, the value to return is obtained by referencing the XamlLanguage.Null static value.

Applies to

See also