Click or drag to resize

ImportExtension Class

The XAML equivalent of the ImportAttribute. Use like the StaticExtension; uses the MEF IExportProvider to create the object.
Inheritance Hierarchy
SystemObject
  System.Windows.MarkupMarkupExtension
    TomsToolbox.Wpf.CompositionImportExtension

Namespace: TomsToolbox.Wpf.Composition
Assembly: TomsToolbox.Wpf.Composition (in TomsToolbox.Wpf.Composition.dll) Version: 2.21.0+44d18b541fc9419ec3c549350a832394661b2a4d
XMLNS for XAML: Not mapped to an xmlns.
Syntax
[MarkupExtensionReturnTypeAttribute(typeof(Object))]
public class ImportExtension : MarkupExtension

The ImportExtension type exposes the following members.

Constructors
 NameDescription
Public methodImportExtension Initializes a new instance of the ImportExtension class.
Top
Properties
 NameDescription
Public propertyAllowRecomposition Gets or sets a value indicating whether recomposition is enabled when the container changes, just like System.ComponentModel.Composition.ImportAttribute.AllowRecomposition
Public propertyContractName Gets or sets the optional contract name of the exported object.
Public propertyMemberType Gets or sets the exported type of the object to provide.
Public propertySetters Gets a list of setters that allow initializing dependency properties of the composed object.
Top
Methods
 NameDescription
Public methodProvideValue When implemented in a derived class, returns an object that is provided as the value of the target property for this markup extension.
(Overrides MarkupExtensionProvideValue(IServiceProvider))
Top
Extension Methods
 NameDescription
Public Extension MethodSafeCastT Performs a cast from object to T, avoiding possible null violations if T is a value type.
(Defined by ObjectExtensions)
Top
See Also