PropertyMap.Remove(String) 方法

定义

从映射中删除给定的属性。

public:
 void Remove(System::String ^ propertyName);
public void Remove (string propertyName);
member this.Remove : string -> unit
Public Sub Remove (propertyName As String)

参数

propertyName
String

要删除的属性名称。

例外

propertyNamenull

示例

下面的代码示例演示如何删除属性到ElementHost控件的Cursor映射。

// The RemoveCursorMapping method deletes the default
// mapping for the Cursor property.
private void RemoveCursorMapping()
{
    elemHost.PropertyMap.Remove("Cursor");
}
' The RemoveCursorMapping method deletes the default
' mapping for the Cursor property.
Private Sub RemoveCursorMapping()
    elemHost.PropertyMap.Remove("Cursor")
End Sub

下面的代码示例演示如何将属性的 Cursor 映射添加到 WindowsFormsHost 控件。

// The RemoveCursorMapping method deletes the default
// mapping for the Cursor property.
private void RemoveCursorMapping()
{
    wfHost.PropertyMap.Remove("Cursor");
}
' The RemoveCursorMapping method deletes the default
' mapping for the Cursor property.
Private Sub RemoveCursorMapping()
    wfHost.PropertyMap.Remove("Cursor")
End Sub

适用于

另请参阅