I have the following MainWindow class:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
namespace mylibrary
{
public class MainWindow : Window
{
WorkSpaceView ws;
public MainWindow()
: base()
{
ws = new WorkSpaceView();
}
}
}
In above code WorkSpaceView is a wpf user control. I need to add this user control to the MainWindow. But I don't know how!? Could you please guide me how should I add and show a user control inside a window, dynamically?