Export (0) Print
Expand All

MarkupExtension.ProvideValue Method

When implemented in a derived class, returns an object that is set as the value of the target property for this markup extension.

Namespace: System.Windows.Markup
Assembly: WindowsBase (in windowsbase.dll)

'Declaration
Public MustOverride Function ProvideValue ( _
	serviceProvider As IServiceProvider _
) As Object
'Usage
Dim instance As MarkupExtension
Dim serviceProvider As IServiceProvider
Dim returnValue As Object

returnValue = instance.ProvideValue(serviceProvider)
public abstract Object ProvideValue (
	IServiceProvider serviceProvider
)
public abstract function ProvideValue (
	serviceProvider : IServiceProvider
) : Object
You cannot use methods in XAML.

Parameters

serviceProvider

Object that can provide services for the markup extension.

Return Value

The object value to set on the property where the extension is applied.

Notes to Implementers: Common services returned by existing markup extensions include IProvideValueTarget and IXamlTypeResolver. Implementations of this method can ignore the serviceProvider parameter, but must also expect a null reference (Nothing in Visual Basic) values in this case. Implementations that require a certain service to return a value are expected to raise exceptions if that service is not available.

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0

Community Additions

ADD
Show:
© 2015 Microsoft