PropertyChangedEventManager 類別

定義

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

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

備註

為了成為此模式中的接聽程式, 您的接聽項物件IWeakEventListener必須執行。In order to be listeners in this pattern, your listener objects must implement IWeakEventListener. 您不需要在做為IWeakEventListener事件來源的類別上執行。You do not need to implement IWeakEventListener on the class that is the source of the events.

屬性

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(INotifyPropertyChanged, EventHandler<PropertyChangedEventArgs>, String)

加入指定的事件處理常式,當指定的來源引發指定之屬性的 PropertyChanged 事件時,就會呼叫這個處理常式。Adds the specified event handler, which is called when specified source raises the PropertyChanged event for the specified property.

AddListener(INotifyPropertyChanged, IWeakEventListener, String)

將指定的接聽程式加入至指定之來源的接聽程式清單。Adds the specified listener to the list of listeners on 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()

傳回新的物件,包含 PropertyChanged 事件的接聽程式。Returns a new object to contain listeners to the PropertyChanged 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 listeners that are no longer active from the data for the provided source.

Remove(Object)

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

(繼承來源 WeakEventManager)
RemoveHandler(INotifyPropertyChanged, EventHandler<PropertyChangedEventArgs>, String)

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

RemoveListener(INotifyPropertyChanged, IWeakEventListener, String)

從所提供來源上的接聽程式清單中移除指定的接聽程式。Removes the specified listener from the list of listeners on the provided source.

ScheduleCleanup()

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

(繼承來源 WeakEventManager)
StartListening(Object)

開始在提供的來源上接聽 PropertyChanged 事件。Begins listening for the PropertyChanged event on the provided source.

StopListening(Object)

停止在提供的來源上接聽 PropertyChanged 事件。Stops listening for the PropertyChanged event on the provided source.

ToString()

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

(繼承來源 Object)
VerifyAccess()

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

(繼承來源 DispatcherObject)

適用於

另請參閱