PropertyMap Class

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Provides a way to translate property values between Windows Forms controls and Windows Presentation Foundation (WPF) elements.

Namespace:   System.Windows.Forms.Integration
Assembly:  WindowsFormsIntegration (in WindowsFormsIntegration.dll)

System::Object
  System.Windows.Forms.Integration::PropertyMap

[SecurityCriticalAttribute]
[PermissionSetAttribute(SecurityAction::InheritanceDemand, Name = "FullTrust")]
public ref class PropertyMap 

NameDescription
System_CAPS_pubmethodPropertyMap()

Initializes a new instance of the PropertyMap class.

System_CAPS_pubmethodPropertyMap(Object^)

Initializes a new instance of the PropertyMap class with the given source object.

NameDescription
System_CAPS_protpropertyDefaultTranslators

Gets a collection of property mappings which are defined by default.

System_CAPS_pubpropertyItem[String^]

Gets or sets the PropertyTranslator delegate for the given property.

System_CAPS_pubpropertyKeys

Gets an ICollection object containing the property names in the PropertyMap collection.

System_CAPS_protpropertySourceObject

Gets the object which has the properties to be translated.

System_CAPS_pubpropertyValues

Gets an ICollection containing the property translators in the PropertyMap collection.

NameDescription
System_CAPS_pubmethodAdd(String^, PropertyTranslator^)

Adds a PropertyTranslator delegate for the given property to the PropertyMap.

System_CAPS_pubmethodApply(String^)

Runs the property translator for the given property, based on the source object's current property value.

System_CAPS_pubmethodApplyAll()

Runs the property translator for each mapped property, based on the source object's current property values.

System_CAPS_pubmethodClear()

Removes all property mappings.

System_CAPS_pubmethodContains(String^)

Gets a value indicating whether the given property is mapped.

System_CAPS_pubmethodEquals(Object^)

Determines whether the specified object is equal to the current object.(Inherited from Object.)

System_CAPS_protmethodFinalize()

Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.(Inherited from Object.)

System_CAPS_pubmethodGetHashCode()

Serves as the default hash function. (Inherited from Object.)

System_CAPS_pubmethodGetType()

Gets the Type of the current instance.(Inherited from Object.)

System_CAPS_protmethodMemberwiseClone()

Creates a shallow copy of the current Object.(Inherited from Object.)

System_CAPS_pubmethodRemove(String^)

Deletes the given property from the mapping.

System_CAPS_pubmethodReset(String^)

Restores the default property mapping for the given property.

System_CAPS_pubmethodResetAll()

Restores the default property mappings.

System_CAPS_pubmethodToString()

Returns a string that represents the current object.(Inherited from Object.)

NameDescription
System_CAPS_pubeventPropertyMappingError

Occurs when an exception is raised by a property translator.

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.

No code example is currently available or this language may not be supported.

The following code example shows how to replace the default mapping for the FlowDirection property on a WindowsFormsHost control.

No code example is currently available or this language may not be supported.

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.

.NET Framework
Available since 3.0

Any public static ( Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top
Show: