Click or drag to resize

ImportExtension Class

The XAML equivalent of the ImportAttribute. Use like the StaticExtension; uses the MEF ExportProvider to create the object.
Inheritance Hierarchy

Namespace:  TomsToolbox.Wpf.Composition
Assembly:  TomsToolbox.Wpf (in TomsToolbox.Wpf.dll) Version: 1.0.64.0 (1.0.64.0)
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 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
Contracts
Invariants
MemberType != null
_setters != null
Learn more about contracts
See Also