PropertyMap.Remove(String) Metoda

Definicja

Usuwa daną właściwość z mapowania.

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

Parametry

propertyName
String

Nazwa właściwości do usunięcia.

Wyjątki

propertyName to null.

Przykłady

Poniższy przykład kodu pokazuje, jak usunąć mapowanie właściwości Cursor do kontrolki ElementHost .

// 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

Poniższy przykład kodu przedstawia sposób dodawania mapowania właściwości Cursor do kontrolki 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

Dotyczy

Zobacz też