CanExecuteChangedEventManager 類別

定義

提供 WeakEventManager 實作,讓您能夠使用「弱式事件接聽程式」模式附加 CanExecuteChanged 事件的接聽程式。Provides a WeakEventManager implementation so that you can use the "weak event listener" pattern to attach listeners for the CanExecuteChanged event.

public ref class CanExecuteChangedEventManager : System::Windows::WeakEventManager
public class CanExecuteChangedEventManager : System.Windows.WeakEventManager
type CanExecuteChangedEventManager = class
    inherit WeakEventManager
Public Class CanExecuteChangedEventManager
Inherits WeakEventManager
繼承
CanExecuteChangedEventManager

備註

如需如何使用此類別的詳細資訊,請參閱弱式事件模式中的「使用現有的弱式事件管理員類別」。For information about how to use this class, see "Using an Existing Weak Event Manager Class" inWeak Event Patterns.

屬性

Dispatcher

取得與這個 Dispatcher 關聯的 DispatcherObjectGets the Dispatcher this DispatcherObject is associated with.

(繼承來源 DispatcherObject)
Item[Object]

取得或設定要為指定的來源儲存的資料。Gets or sets the data being stored for the specified source.

(繼承來源 WeakEventManager)
ReadLock

在基礎資料表上建立讀取鎖定,並傳回 IDisposableEstablishes a read-lock on the underlying data table, and returns an IDisposable.

(繼承來源 WeakEventManager)
WriteLock

在基礎資料表上建立寫入鎖定,並傳回 IDisposableEstablishes a write-lock on the underlying data table, and returns an IDisposable.

(繼承來源 WeakEventManager)

方法

AddHandler(ICommand, EventHandler<EventArgs>)

加入指定的委派做為指定之來源的事件處理常式。Adds the specified delegate as an event handler of the specified source.

CheckAccess()

判斷呼叫的執行是否可以存取這個 DispatcherObjectDetermines whether the calling thread has access to this DispatcherObject.

(繼承來源 DispatcherObject)
DeliverEvent(Object, EventArgs)

將受管理的事件傳遞給每一個接聽程式。Delivers the event being managed to each listener.

(繼承來源 WeakEventManager)
DeliverEventToList(Object, EventArgs, WeakEventManager+ListenerList)

將受管理的事件傳遞給所提供清單中的每一個接聽程式。Delivers the event being managed to each listener in the provided list.

(繼承來源 WeakEventManager)
Equals(Object)

判斷指定的物件是否等於目前的物件。Determines whether the specified object is equal to the current object.

(繼承來源 Object)
GetHashCode()

作為預設雜湊函數。Serves as the default hash function.

(繼承來源 Object)
GetType()

取得目前執行個體的 TypeGets the Type of the current instance.

(繼承來源 Object)
MemberwiseClone()

建立目前 Object 的淺層複製。Creates a shallow copy of the current Object.

(繼承來源 Object)
NewListenerList()

傳回新的物件,包含 CanExecuteChanged 事件的接聽程式。Returns a new object to contain listeners to the CanExecuteChanged event.

ProtectedAddHandler(Object, Delegate)

加入指定的委派做為指定之來源的事件處理常式。Adds the specified delegate as an event handler of the specified source.

(繼承來源 WeakEventManager)
ProtectedAddListener(Object, IWeakEventListener)

將提供的接聽程式加入至所提供的受管理事件來源。Adds the provided listener to the provided source for the event being managed.

(繼承來源 WeakEventManager)
ProtectedRemoveHandler(Object, Delegate)

從指定的來源移除先前新增的處理常式。Removes the previously added handler from the specified source.

(繼承來源 WeakEventManager)
ProtectedRemoveListener(Object, IWeakEventListener)

從提供的來源移除先前加入的接聽程式。Removes a previously added listener from the provided source.

(繼承來源 WeakEventManager)
Purge(Object, Object, Boolean)

從所提供來源的資料清單中移除非現用接聽程式項目。Removes inactive listener entries from the data list for the provided source.

Remove(Object)

移除指定來源的所有接聽程式。Removes all listeners for the specified source.

(繼承來源 WeakEventManager)
RemoveHandler(ICommand, EventHandler<EventArgs>)

從指定的來源中移除指定的事件處理常式。Removes the specified event handler from the specified source.

ScheduleCleanup()

要求在較低優先權執行緒上執行基礎接聽程式清單中未使用項目的清除動作。Requests that a purge of unused entries in the underlying listener list be performed on a lower priority thread.

(繼承來源 WeakEventManager)
StartListening(Object)

開始接聽所指定來源上的 CanExecuteChanged 事件。Begins listening for the CanExecuteChanged event on the specified source.

StopListening(Object)

停止接聽所指定來源上的 CanExecuteChanged 事件。Stops listening for the CanExecuteChanged event on the specified source.

ToString()

傳回代表目前物件的字串。Returns a string that represents the current object.

(繼承來源 Object)
VerifyAccess()

請強制執行可以存取這個 DispatcherObject 的呼叫執行緒。Enforces that the calling thread has access to this DispatcherObject.

(繼承來源 DispatcherObject)

適用於