This project has moved and is read-only. For the latest updates, please go here.

Problem with Avalondock IsActive

Jun 21, 2013 at 7:44 AM

I have one DocumentPane, to wich I add Items like this:

var tv = sender as TreeViewItem;
        var tvNew = tv.TryFindFromPoint<TreeViewItem>(e.GetPosition(tv));
        if (tvNew.DataContext is PlantDTO)
            e.Handled = true;

            var plant = (PlantDTO) tvNew.DataContext;

            var mainWindow = MainWindow.Instance;
            var documentPane = mainWindow.DockManager.Layout.Descendents().OfType<LayoutDocumentPane>().FirstOrDefault();
            var doc = new LayoutDocument() {Content = new MfcPlcDesigner(null, plant)};
            doc.Title = "Technology Scheme (" + plant.Name + ")";
            doc.IsActive = true;             
The Problem is now, That not the currently Added LayoutDocument is in Foreground, no the last one wich was Active! But when I look at the LastFocusedDocument Property, this is set to my new one!

Do I something wrong or is this a Bug?
Jun 25, 2013 at 7:39 AM
Noone any Idea?