Visual Studio 2008 C#.NET: Displaying a User Control in Content Control

I was searching in the internet on how to display my user control when I click an item in my tree control. I was dismayed when I saw nothing that will address my problem so I opened my MSDN and do it myself.

In your Visual Studio 2008 IDE toolbox you have the content control. In this control you have the Content property. So, if you want your user control to be displayed inside the content control you'll just need to do this:

contentControl1.Content = new MyUserControl();

That's it!

Comments

Popular posts from this blog

Creating tray application and popup context menu in Windows

How to statically link applications to wxWidgets via Visual Studio 2008 and in Linux

How to put an image to wxPanel using wxWidgets