共用方式為


EventBindingService.RemoveMethod 方法

在衍生類別中覆寫時,要求特定方法從事件處理類別中移除特定事件,進而停止處理該事件。

命名空間:  Microsoft.Windows.Design.Services
組件:  Microsoft.Windows.Design.Interaction (在 Microsoft.Windows.Design.Interaction.dll 中)

語法

'宣告
Public MustOverride Function RemoveMethod ( _
    modelEvent As ModelEvent, _
    methodName As String _
) As Boolean
public abstract bool RemoveMethod(
    ModelEvent modelEvent,
    string methodName
)
public:
virtual bool RemoveMethod(
    ModelEvent^ modelEvent, 
    String^ methodName
) abstract
abstract RemoveMethod : 
        modelEvent:ModelEvent * 
        methodName:string -> bool 
public abstract function RemoveMethod(
    modelEvent : ModelEvent, 
    methodName : String
) : boolean

參數

  • methodName
    型別:System.String
    用以停止處理 modelEvent 的方法。

傳回值

型別:System.Boolean
如果 methodName 已從事件處理類別中成功移除則為 true,否則為 false。

備註

如果方法不是空的,則會忽略這個要求。

.NET Framework 安全性

請參閱

參考

EventBindingService 類別

Microsoft.Windows.Design.Services 命名空間

ModelEditingScope

ModelEventCollection

其他資源

WPF 設計工具擴充性架構