Uredi

Deli z drugimi prek


IReceiveMarkupExtension Interface

Definition

Caution

IReceiveMarkupExtension has been deprecated. This interface is no longer in use.

Provides a mechanism whereby types can declare that they can receive an expression (or another class) from a markup extension, where the output is a different property type than the target property. Do not use for .NET Framework 4 implementations.

public interface class IReceiveMarkupExtension
public interface IReceiveMarkupExtension
[System.Obsolete("IReceiveMarkupExtension has been deprecated. This interface is no longer in use.")]
public interface IReceiveMarkupExtension
type IReceiveMarkupExtension = interface
[<System.Obsolete("IReceiveMarkupExtension has been deprecated. This interface is no longer in use.")>]
type IReceiveMarkupExtension = interface
Public Interface IReceiveMarkupExtension
Attributes

Remarks

In .NET Framework 3.0, IReceiveMarkupExtension was a WPF-specific technique for permitting types to enter a different codepath whenever any of its XAML-accessible members where set as markup extensions during XAML parsing. In .NET Framework 4, this interface is obsolete, and is replaced with a .NET Framework XAML Services implementation for how markup extensions can receive services or types can invoke markup-extension specific setter logic.

For .NET Framework 4 implementations, if types want to perform special processing when setting properties by markup extension rather than by other means, types should be defined with XamlSetMarkupExtensionAttribute attributes applied. The attribute specifies a callback, which is typically defined as a private member of the type.

In infrastructure implementations of WPF classes, most cases where XamlSetMarkupExtensionAttribute is applied reference a ReceiveMarkupExtension method that previously implemented this interface, but now instead use context through the callback.

Methods

ReceiveMarkupExtension(String, MarkupExtension, IServiceProvider)

Provides the handling for markup extensions that provide property values. Do not use for .NET Framework 4 implementations; see IReceiveMarkupExtension.

Applies to

See also