Some applications have the idea of an ActiveDocument -- they update toolbars to match the DocumentWindow that currently has the focus. It seems this mechanism of acquiring the ActiveDocument and knowing when that has changed (an ActiveDocument changed) event is absent in SandRibbon WPF. With one exception. That exception is the IsSelected dependency property on DockableWindow.
I wrote that much and decided to pull up the code in the reflector. I discovered that the active window uses the WPF Selector primitive. That means you can subscribe to selection events with this line:
EventManager
.RegisterClassHandler(typeof(DocumentWindow), Selector.SelectedEvent, new RoutedEventHandler(SelectionChanged), true);
Or so I thought. Alas, it doesn't work. I don't ever see those events come through. What am I doing wrong? Do I need to instantiate a Selector object somewhere?