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
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應