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 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈