PropertyMap Class
Provides a way to translate property values between Windows Forms controls and Windows Presentation Foundation (WPF) elements.
Assembly: WindowsFormsIntegration (in WindowsFormsIntegration.dll)
XMLNS for XAML: http://schemas.microsoft.com/winfx/2006/xaml/presentation, http://schemas.microsoft.com/netfx/2007/xaml/presentation
The PropertyMap type exposes the following members.
| Name | Description | |
|---|---|---|
![]() | PropertyMap() | Initializes a new instance of the PropertyMap class. |
![]() | PropertyMap(Object) | Initializes a new instance of the PropertyMap class with the given source object. |
| Name | Description | |
|---|---|---|
![]() | DefaultTranslators | Gets a collection of property mappings which are defined by default. |
![]() | Item | Gets or sets the PropertyTranslator delegate for the given property. |
![]() | Keys | Gets an ICollection object containing the property names in the PropertyMap collection. |
![]() | SourceObject | Gets the object which has the properties to be translated. |
![]() | Values | Gets an ICollection containing the property translators in the PropertyMap collection. |
| Name | Description | |
|---|---|---|
![]() | Add | Adds a PropertyTranslator delegate for the given property to the PropertyMap. |
![]() | Apply | Runs the property translator for the given property, based on the source object's current property value. |
![]() | ApplyAll | Runs the property translator for each mapped property, based on the source object's current property values. |
![]() | Clear | Removes all property mappings. |
![]() | Contains | Gets a value indicating whether the given property is mapped. |
![]() | Equals(Object) | Determines whether the specified Object is equal to the current Object. (Inherited from Object.) |
![]() | Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) |
![]() | GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) |
![]() | GetType | Gets the Type of the current instance. (Inherited from Object.) |
![]() | MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) |
![]() | Remove | Deletes the given property from the mapping. |
![]() | Reset | Restores the default property mapping for the given property. |
![]() | ResetAll | Restores the default property mappings. |
![]() | ToString | Returns a string that represents the current object. (Inherited from Object.) |
Use the PropertyMap class to define translations between Windows Forms properties and Windows Presentation Foundation (WPF) properties in a hybrid application. The ElementHost::PropertyMap and WindowsFormsHost::PropertyMap properties on the ElementHost and WindowsFormsHost classes define mappings from one technology to the other.
For more information, see Walkthrough: Mapping Properties Using the ElementHost Control and Walkthrough: Mapping Properties Using the WindowsFormsHost Element.
The following code example shows how to add a mapping for the Margin property to an ElementHost control.
The following code example shows how to replace the default mapping for the FlowDirection property on a WindowsFormsHost control.
- SecurityAction::LinkDemand
for full trust for the immediate caller. This member cannot be used by partially trusted code.
- SecurityAction::InheritanceDemand
for full trust for inheritors. This member cannot be inherited by partially trusted code.
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
