Assembly: WindowsBase (in windowsbase.dll)
The listener element to add to the WeakEventManager.ListenerList.
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 Add 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 EditionThe Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.