I have a RadDock with several MdiChildren/DockWindows. When the user closes one of the tabs I want the focus to be set to the previously active tab.
In the ActiveWindowChanged event I remeber the previous active tab.
I've tried both the radDock.ActivateMdiChild(Form) and radDock.ActivateWindow(DockWindow) methods
What am I missing?
bool exists = (Array.IndexOf(radDock.MdiChildren, _currentMdi) != -1);
if (!exists && _prevMdi != null)
{
_currentMdi = null;
_currentDockWindow = null;
//radDock.ActivateMdiChild(_prevMdi);
radDock.ActivateWindow(_prevDockWindow);
}
_prevMdi = _currentMdi;
_currentMdi = (Form) ((HostWindow) e.DockWindow).Content;
_prevDockWindow = _currentDockWindow;
_currentDockWindow = e.DockWindow;