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

  • Home
  • SEARCH
  • 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 7159817
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T13:17:40+00:00 2026-05-28T13:17:40+00:00

I just got done following the steps in this MSDN article on creating a

  • 0

I just got done following the steps in this MSDN article on creating a WPF UI AddIn: http://msdn.microsoft.com/en-us/library/bb909849%28v=vs.90%29.aspx

The code works, clicking the button makes the box pop up, ectect. I placed the Add-in’s usercontrol in a tab item, as the Tab item’s content:

TabItem tab = new TabItem();
tab.Name = info.AssemblyName.Name;
tab.Header = info.Name;
tab.Content = plug.GetAddInUI();
TabHost.Items.Add(tab); //Add the page to the TabControl

This worked perfectly, as expected. However, an interesting thing happens when you click the button. The messagebox pops up, but then the tab control “freezes”. I can’t switch to any other tabs. The button still triggers the messagebox, and I can move the whole window, so the program isn’t hung.

I can “force” the tab control to fix itself by entering break mode via VS, then resuming the program, or by minimizing/restoring the window, ect.

I’ve read the posts about MessageBox inhibiting event processing, so I changed the Messagebox to a Debug.Writeline. The bug still persists.

My code follows MSDN’s almost to the letter, however, as it’s quite long, I’d refrain from posting all of it here. At the same time, I’m unsure which segments are relevant. If you tell me which parts to post, I”ll do so.

  • 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-28T13:17:40+00:00Added an answer on May 28, 2026 at 1:17 pm

    I managed to resolve it by calling TabControl.Focus() when the selection changed, like so:

    private void TabHost_SelectionChanged(object sender, SelectionChangedEventArgs e)
    {
        TabHost.Focus();
    }
    

    I believe this is a bug in WPF, and not anything that I did.

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

Sidebar

Related Questions

I just got done setting up my app to work with authlogic following this
I got hints from http://www.dougscripts.com/itunes/ to come up with the following code. But it
I just got done working through the Django tutorials for the second time, and
Just got a question about generics, why doesn't this compile when using a generic
I just got this error message: ... from c:/ruby/lib/ruby/gems/1.8/gems/... ... 10 levels... from c:/ruby/lib/ruby/gems/1.8/gems/...
I got the following insistent JS issue just for IE 8-9, in other browsers
I've got a just installed ubuntu 11.10. I follow the first answer in this
I've got the following structure www.website.com --> ASP.NET 4.0 Web-site www.website.com/blog --> NET 4.0,
Just got a request from my boss for an application I'm working on. Basically
I just got Delphi 2009 and have previously read some articles about modifications that

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.