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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T03:23:29+00:00 2026-06-13T03:23:29+00:00

I have an application where I have a custom UserControl inside a TabControl. Every

  • 0

I have an application where I have a custom UserControl inside a TabControl. Every so often the whole app needs to refresh it’s data. To handle it, I’m doing the following in the code-behind.

    public void OnDataReloaded(object a)
    {
        WindowManager.GraphControl = new GraphControl();
        GraphTab.Content = WindowManager.GraphControl;
        graphloaded = true;
    }

GraphTab is an instance of TabItem in my TabControl. WindowManager is a static class that handles references to currently active User Controls.
On my UserControl, I have added an event handler: KeyDown=”MyGraphControl_KeyDown_1″ as a property to the UserControl.

After I execute the code above, everything works as expected. My TabControl loads the new UserControl, however keydown events aren’t being captured anymore. Any idea why that might be the case?

Thanks!

  • 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-06-13T03:23:30+00:00Added an answer on June 13, 2026 at 3:23 am

    Im not 100% sure but my best guess is that because its a new instance of a GraphControl – the Events would have been destroyed or are still in linked to the old instance of the control in Memory.

    Before you give it a new instance, make sure you un subscribe to the events and also try re pointing the event handlers to your methods.

    Hope that helps!

    ste.

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

Sidebar

Related Questions

I'm developing a WPF application, and I have created a custom usercontrol because I
I have made a custom UserControl i Vb.net (windows application). How can I add
We have an application (a custom network management tool for building automation) that supports
I have an application with the default directory structure, for an application without custom
Have you tried Psyco in a wsgi application (custom, Pylons, Django...)? What does your
We have a web application that has custom errors turned on so that users
I have a application for android 2.3.3 where I am setting some custom titles
I have an application and I put in drawable-hdpi, drawable-ldpi and drawable-mdpi a custom
Well, here is my problem: I have an application that uses a custom Javascript
I have a custom WebForms application that is utilized for our helpdesk that does

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.