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 1098899
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T00:39:02+00:00 2026-05-17T00:39:02+00:00

The following code was part of an answer I have received to solve a

  • 0

The following code was part of an answer I have received to solve a probem I have posted in SO. It works fine, however I’m curious if its allowed to manually invoke another event from within an
invocation-method with the EventArgs of the original event:

protected override void OnMouseLeftButtonUp( MouseButtonEventArgs e )   {   
    base.OnMouseLeftButtonDown( e );   
}  

I have seen this pattern frequently but never used it because I feared always that this could lead to sideeffects or problems in future versions of WPF. Has anyone the insight to tell me if such redirected event-invocations are save?

  • 1 1 Answer
  • 3 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-17T00:39:02+00:00Added an answer on May 17, 2026 at 12:39 am

    I would be very careful with doing this. If the event data contains stuff that is only relevant to the original event the other event handler can be confused by this data. Especially when it comes to events from external devices like the mouse.

    Maybe this example you posted is ok, I don’t know. But I can definitely see a problem with doing the other way around, raising mouse down when you get a mouse up – the mouse down handler could (potentially, I have no idea if it does this) query the input device for the actual status of that mouse and they wouldn’t match. Or perhaps do some operation on the mouse that only works when it is pressed etc.

    So in summary: It may work, but I would not rely on it unless you are 100% sure it won’t break under certain conditions

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

Sidebar

Related Questions

Using linkedin-j , I have the following code in one part of my application
Ok - I have the following code - on the starred part I get
I have the following code in one cpp file which is part of a
I have the following code, which is run every 10ms as part of a
I have this following code: if (userValueSom01 == realResult01) { //answer = correct //count
I have the following piece of code. I do not understand why its not
I have the following code, repeated on each Form , as part of the
I have an android app that works fine, apart from that in one part
I am using the following code as part of an autocomplete script to avoid
The following code is taken from here . I removed all Windows NT part

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.