This project is read-only.

How to get currently selected DocumentContent object?

Jun 23, 2009 at 3:22 PM


I haven't been able to work out how to get the currently selected document. Can anyone help?

I have the following XAML:

<ad:DockingManager x:Name="dockManager">
<ad:ResizingPanel Orientation="Vertical" >
                        <ad:DocumentPane x:Name="documentsHost">
                            <ad:DocumentContent Title="File1.doc">
                            </ad:DocumentContent >
                            <ad:DocumentContent Title="File2.doc">
                            </ad:DocumentContent >
                        <ad:DockablePane ad:ResizingPanel.ResizeHeight="200">
                            <ad:DockableContent Title="Details">
                                <TextBox />



I'm trying to reference the currently select item. Would've thought I could use the following:

but it doesn't work. Any suggestions?

Many thanks,

Jun 23, 2009 at 3:26 PM

You just have to use dockManager.ActiveDocument.

Jun 23, 2009 at 4:02 PM

of right, doh!

Thanks so much for the quick response. I forgot about that. ;)