共用方式為


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

適用於

另請參閱