WeakEventManager.ListenerList.Remove Method

Removes the first occurrence of a listener item from the WeakEventManager.ListenerList.

Namespace: System.Windows
Assembly: WindowsBase (in windowsbase.dll)

public void Remove (
	IWeakEventListener listener
)
public void Remove (
	IWeakEventListener listener
)
public function Remove (
	listener : IWeakEventListener
)
You cannot use methods in XAML.

Parameters

listener

The item to remove.

You should always call PrepareForWriting before changing the list contents. Otherwise, the list may be in process of delivering events and therefore the original is locked. Calling PrepareForWriting changes the input list to be a clone so that your Remove call can still work on the clone. If PrepareForWriting returns true, you might need to update any private references to the list that you maintain in other areas of your code.

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0

Community Additions

ADD
Show: