PresentationSource.RemoveSourceChangedHandler Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Removes a handler for the SourceChanged
event from the provided element.
public:
static void RemoveSourceChangedHandler(System::Windows::IInputElement ^ e, System::Windows::SourceChangedEventHandler ^ handler);
public static void RemoveSourceChangedHandler (System.Windows.IInputElement e, System.Windows.SourceChangedEventHandler handler);
static member RemoveSourceChangedHandler : System.Windows.IInputElement * System.Windows.SourceChangedEventHandler -> unit
Public Shared Sub RemoveSourceChangedHandler (e As IInputElement, handler As SourceChangedEventHandler)
Parameters
The element to remove the handler from.
- handler
- SourceChangedEventHandler
The handler implementation to remove.
Remarks
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.
Applies to
See also
Feedback
https://aka.ms/ContentUserFeedback.
Kommer snart: I hele 2024 udfaser vi GitHub-problemer som feedbackmekanisme for indhold og erstatter det med et nyt feedbacksystem. Du kan få flere oplysninger under:Indsend og få vist feedback om