Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6031501
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T05:11:35+00:00 2026-05-23T05:11:35+00:00

I need to know that how to check any event handler already assigned ?

  • 0

I need to know that how to check any event handler already assigned ? (in QuickWatch)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T05:11:36+00:00Added an answer on May 23, 2026 at 5:11 am

    I’m not sure if I understood the question correctly, but I will give it a shot:

    1. How to check if any event handlers attached to an event TestEvent:

      TestEvent will be null if no event handlers attached.

    2. If one handler attached (single-cast delegate) _invocationList == 0:

      Paste the following to the QuickWatch expression string:

      ((System.Reflection.RuntimeMethodInfo)(((System.Delegate)(TestEvent))._methodBase)).Name
      

      to find out what event handler is attached.

    3. If more than one handler attached (multicast delegate) _invocationList > 0:

      You need to look through _invocationList, for example to check first attached method:

      ((System.Reflection.RuntimeMethodInfo)(((System.Delegate)(((object[])(((System.MulticastDelegate)(TestEvent))._invocationList))[0]))._methodBase)).Name
      

      To check other attached handlers: change index to 1, 2, etc or just expand each element of the _invocationList array.

    Alternatively to using Name property which is just a handler method name, you can use m_toString field which is method signature.

    In all the examples about replace TestEvent with the name of your event.

    [Edit] Didn’t realize you are using WPF. WPF event system is much more complicated.

    Let’s say you have a button and what to check if any handler is attached to MouseLeftButtonDown event:

    1. Open QuickWhatch.
    2. Paste you button variable name (let’s say button1).
    3. Drill down through the bases classes till you got to the UIElement. Or to get there quickly paste this ((System.Windows.UIElement)(button1)).EventHandlersStore to the expression input.
    4. Locate and expand property EventHandlersStore.
    5. Expand _entries.
    6. Expand _mapStore.
    7. Expand [MS.Utility....]
    8. You will see the list of _entry0, _entry1, … _entry_n. Each of those are all the events that the button has handlers assigned too.
    9. To find out what handlers are assigned to, drill further to particular entry Value => _listStore.
    10. You will see the list of _entry0, _entry1 … again. Those are all the handlers attached to this particular event.

    enter image description here

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I know that I need to tell my UITextField to resign first responder when
I know that I need to add the tracking code snippet at the bottom
Need to know this so that i could send DTMF and that is going
I know that table sources need a data source to hold the data that
I know that to find all the .h files I need to use: find
We all know that RAW pointers need to be wrapped in some form of
I know enough to know that we need to get our application to deploy
I need to have some information about the scoping in JavaScript. I know that
HI, i need a XML parser. i want to know that which one is
The example below, is just an example, I know that I don't need an

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.