This documentation is archived and is not being maintained.

PresentationSource.RemoveSourceChangedHandler Method

Removes a handler for the SourceChanged event from the provided element.

Namespace: System.Windows
Assembly: PresentationCore (in presentationcore.dll)

public static void RemoveSourceChangedHandler (
	IInputElement e,
	SourceChangedEventHandler handler
)
public static void RemoveSourceChangedHandler (
	IInputElement e, 
	SourceChangedEventHandler handler
)
public static function RemoveSourceChangedHandler (
	e : IInputElement, 
	handler : SourceChangedEventHandler
)
You cannot use methods in XAML.

Parameters

e

The element to remove the handler from.

handler

The handler implementation to remove.

Even though this is a routed event, there are special restrictions placed on this event that differ from normal routed event behavior, due to the relatively small number of elements in a typical application scenario that would concern themselves with handling this event.

  • You cannot use the UIElement or ContentElement RemoveHandler methods to remove handlers. You must use RemoveSourceChangedHandler.

  • The C# += and -= event handler syntaxes, and other language specific handler syntaxes, are not supported, because the event itself is not exposed as public. Only the PresentationSource utility methods for adding and removing the handlers directly are supported.

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
Show: