using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace Ingenious.Mvc.Visualizers{
public partial class VisualizerHostForm : Form
{
static VisualizerHostForm()
{
//doesn't display with visual styles enabled without this
Application.EnableVisualStyles();
}
public VisualizerHostForm()
{
InitializeComponent();
}
public T SetHostedControl<T>()
where T : Control
{
T control = Activator.CreateInstance<T>();
control.Dock = DockStyle.Fill;
Controls.Add(control);
return control;
}
}
}
|