-
Hi, Some Avalonia controls have static events which can be globally subscribed through the AddClassHandler method. For insrance, we can subcribe the MenuOpenedEvent - http://reference.avaloniaui.net/api/Avalonia.Controls/MenuBase/8450CD04 - using this method - http://reference.avaloniaui.net/api/Avalonia.Interactivity/RoutedEvent/C7C528DD. My question is how can I unsubscribe these static events? |
Beta Was this translation helpful? Give feedback.
Answered by
jp2masa
Feb 3, 2021
Replies: 1 comment 1 reply
-
|
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
maxkatz6
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
AddClassHandler
returnsIDisposable
, which can be used to dispose the subscription.