Reference.ProvideValue Method (IServiceProvider)

.NET Framework (current version)

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

Returns an object that is the value of the target property. For the Reference type, this is the object that the provided Name references.

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

public override object ProvideValue(
	IServiceProvider serviceProvider


Type: System.IServiceProvider

A class that implements the IXamlNameResolver service.

Return Value

Type: System.Object

The value of the target property. This is potentially any object that is type-mapped in the relevant backing assemblies.

Exception Condition

serviceProvider value does not implement the IXamlNameResolver service.


Name value has not been set through construction or positional usage.


serviceProvider is null.

This method expects a serviceProvider value that implements the IXamlNameResolver service.

.NET Framework
Available since 4.0
Return to top