To reproduce:
1. Add two RadDock controls on the form and one RadButton.
2. Use the following code snippet:
public Form1()
{
InitializeComponent();
this.IsMdiContainer = true;
this.radDock1.AutoDetectMdiChildren = true;
this.radDock2.AutoDetectMdiChildren = false;
this.radDock1.ActiveWindowChanged += radDock1_ActiveWindowChanged;
}
private void radButton1_Click(object sender, EventArgs e)
{
RadForm f = new RadForm();
f.MdiParent = this;
f.Show();
f.Text = DateTime.Now.ToLongTimeString();
}
private void radDock1_ActiveWindowChanged(object sender, Telerik.WinControls.UI.Docking.DockWindowEventArgs e)
{
Console.WriteLine("ActiveWindowChanged");
}
If you click the button you will notice that the last added DocumentWindow is not active.
Workaround: this.radDock1.DockWindowAdded += radDock1_DockWindowAdded;
private void radDock1_DockWindowAdded(object sender, Telerik.WinControls.UI.Docking.DockWindowEventArgs e)
{
this.radDock1.ActiveWindow = e.DockWindow;
}