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

The Archive Base Latest Questions

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

By Using reflector you can see that WPF UserControl is overriding AdjustBranchSource. internal override

  • 0

By Using reflector you can see that WPF UserControl is overriding AdjustBranchSource.

    internal override void AdjustBranchSource(RoutedEventArgs e) {     e.Source = this;  } 

My very own problem regards inconsistency caused by that issue. When an element is based inside a user control or outside. The Source parameter behaves differently. Which surprises me the source should always be the element in target by the RoutedEvent.

The question is why was it implemented like that?

  • 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. 2026-05-11T11:35:29+00:00Added an answer on May 11, 2026 at 11:35 am

    This kinda makes sense. If you treat the UserControl as a black box then you shouldn’t know what controls are on it, and thus the source of an event.

    If you need to distinguish between different buttons on the UserControl then the UserControl should have it’s own events which the buttons trigger. That way from the outside it looks like the right event and the user of the UserControl doesn’t need to know which button did which event.

    To give an example, on a listbox, do you need to know that the down-scroll button was the button that sent the original event? Or do you just need to know that a scroll-down event was triggered.

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

Sidebar

Related Questions

I think that this problem can be sorted using reflection (a technology which I'm
If I look at some classes in the framework, using reflector, I can see
Using reflection, how can I get all types that implement an interface with C#
I was using .Net Reflector on an Internal App to try and understand what
How can I convert TO a Nullable from a String using reflection? I have
How can I test a private method of an abstract class using reflection (using
How can I invoke a method with parameters using reflection ? I want to
How can I list all the classes in my current project(assembly?) using reflection? thanks.
By using java reflection, we can easily know if an object is an array.
How can I generate types like these using the System.Reflection.Emit libraries: public class Test<T>

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.