I am using Dock and RibbonBar (Q2 2009 release) to design a UI. I have the Dock control set to AutoDetectMdiChildren, and can easily add forms as tabbed documents. What I would like to do is change the active RibbonTab based on the active child form in Dock so that the commands match the active document.
I thought this would be relatively easy to do, but I seem to be stuck.
I have implemented an event handler for the ActiveWindowChanged event of the Dock control. I can obviously gain access to the DockWindow via the DockWindowEventArgs parameter. What I haven't been able to do is determine the type of form that the DockWindow represents. Basically what I would like to be able to do is something like this:
|if (DockWindow is SettingsForm) |
| // Change to appropriate RadRibbonTab |
| // do something else |
It seems like there should be a way of doing something like this without having to iterate over the MdiChildren array and I would be at all surprised if I am looking at this the wrong way.