Читати англійською Редагувати

Поділитися через


PropertyMap.Remove(String) Method

Definition

Deletes the given property from the mapping.

C#
public void Remove(string propertyName);

Parameters

propertyName
String

The name of the property to remove.

Exceptions

propertyName is null.

Examples

The following code example shows how to remove a mapping for the Cursor property to an ElementHost control.

C#
// The RemoveCursorMapping method deletes the default
// mapping for the Cursor property.
private void RemoveCursorMapping()
{
    elemHost.PropertyMap.Remove("Cursor");
}

The following code example shows how to add a mapping for the Cursor property to a WindowsFormsHost control.

C#
// The RemoveCursorMapping method deletes the default
// mapping for the Cursor property.
private void RemoveCursorMapping()
{
    wfHost.PropertyMap.Remove("Cursor");
}

Applies to

Продукт Версії
.NET Framework 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9, 10

See also