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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T00:27:02+00:00 2026-06-16T00:27:02+00:00

I have a Visual Studio 2012 C# app that uses a WinForms UserControl nested

  • 0

I have a Visual Studio 2012 C# app that uses a WinForms UserControl nested in a WPF WindowsFormsHost container. The app works fine. To add the WinForms UserControl to the project I had to directly edit the main form’s XAML file. That wasn’t hard but if it’s possible I’d like to be able to work from the Toolbox instead.

I found several different threads on Stack Overflow that dealt with problems getting a control to appear in the Visual Studio Toolbox, but none of them discussed getting a WinForms control to appear in the Toolbox of a WPF project (mixed project). Note, the WinForms UserControl does appear in the Toolbox when I use it in a WinForms project. But if the host project is a WPF project, I only see WPF controls in the Toolbox. I tried adding the WinForms control by doing the following:

  • Right-clicking in the Toolbox
  • Selecting Choose Items
  • Selecting the .NET Framework Components tab
  • Browsing to the DLL that contains the WinForms UserControl
  • Selecting the DLL and clicking OK

The contained controls are imported into the .NET Framework Components list but do not show up in the Toolbox after I exit out of the Choose Items dialog. What’s odd is, I tried unloading the DLL’s controls and repeating this operation a few times and I got inconsistent results. I never got the controls to show, but one time I got a dialog box saying “the controls had been imported but were not active in the Designer” and that I should make sure they are compatible. Another time I got an error box saying the DLL did not contain any usable controls. Most times it would show the imported controls in the .NET Framework Components list with a check mark next to them in the list and the row(s) highlighted in blue. But again, despite not seeing any error or warning messages, they were not shown in the Toolbox. Note, the .NET project that is the source of the WinForms control DLL is a project in the Solution.

So, is it possible to get a Winforms UserControl to show in the Toolbox of a WPF project? If so, how?

  • 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-16T00:27:03+00:00Added an answer on June 16, 2026 at 12:27 am

    Not the most straightforward solution, but you could create a wrapper containing a WindowsFormsHost object. I can’t document it, but I suppose that you can’t natively combine the two control types because of the airspace problem.

    EDIT: I’ve created a WPF Application solution, then added a WPF User Control Library project to the solution. Afterwards, I’ve referenced WindowsFormsIntegration in the latter project, added a WindowsFormsHost container, set a System.Windows.Forms.TextBox as its child. After compiling it, in the ToolBox there was a new element, containing the newly created control. I can drag it from there to “All WPF Controls” or select the compiled assembly from the Choose Items dialog.

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

Sidebar

Related Questions

I have the most annoying problem with Visual Studio 2012 and WPF I was
I have a desktop application developed with Lightswitch using Visual Studio 2012. The app
I have upgraded my 2011 Lightswitch app to 2012 RTM and it works fine
We have built an app with Visual Studio 2012 and it runs beautifully on
I have installed Visual Studio 2012 RC. I would like to find any example
Started using Visual Studio 2012 RC since yesterday, We have one WCF solution. Whenever
I am building an application in C# visual studio 2012 RC. I have to
I have set up Visual Studio 2012 Professional to download debug symbols. It is set up
I have Visual Studio 2008 Standard Edition. In that edition i have access to
I am new to Visual Studio 2012 and Javscript coding. I have two questions

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.