[Version 2.0] ActiveContent not updated...

Aug 10, 2012 at 1:42 PM

Im sorry if this is a duplicate of the Issue #15480, but i wanted to post this to the discussions to see if anyone has an idea of a work around i could use.

 

The problem is describe at:

http://avalondock.codeplex.com/workitem/15480

 

This is the last issue stopping me to move officially my project to 2.0

 

Thanks for any input.

Aug 10, 2012 at 5:16 PM

Hi, I have set up a fix for the issue in latest build, Ado

Aug 10, 2012 at 6:38 PM
Edited Aug 10, 2012 at 6:40 PM

Hi Ado,

first i want to mention againt thanks for all the effort you've put into this very usefull library!

So i've just try the new fix but i have some bad news, it still doesn't work :(  Same issue where selecting the content of the tab doesn't set the activeContent.

I could try to put together a small project to replicate the problem.

Also in this new version, i've encounter a few new bugs:

When i try to use the "New Vertical Tab Group" context menu option to put the LayoutDocument Tab side by side i got the following errors:

LayoutGroup.cs
===============
@Line 62  --> Crash because element is null
Proposed changed:

  if (element !=null && element.Parent != this)

  NOTE: Possibly need to change line 49 with the same test

 

After i did the change, the crash occured in:

LayoutDocumentPane.cs
===============
@Line 76  --> Crash because Children[0] is null
Proposed changed:

 if (_selectedIndex >= 0 && _selectedIndex < Children.Count && Children[_selectedIndex] !=null)


 NOTE: Possibly need to change line 69 with the same test

 

Finally once i did the modification, the error was thrown at:

LayoutItem.cs
===============
@Line 862--> Crash because LayoutElement is null 
 

 I stopped there to right this message. 

Although undocking and redocking a LayoutDocument side-by-side the other document was working fine.



 

So i will try to see if i can put together a small example to replicate my problem, unless you know for sure what is going on?

Thanks!

Aug 10, 2012 at 7:23 PM

Maybe i can help more with the new bug,

 

the problem seem  to reside in the new modification you've did in LayoutItem.cs @ line 94 (LayoutElement = null;)

It seems that in the ExecuteNewVerticalTabGroupCommand Method, the line 859 will trigger the Detach method will be called and therefore set the layoutelement to nothing and then fail at line 864 because it's passing LayoutElement which is NULL.

 

I hope this save you some time

 

Aug 10, 2012 at 7:51 PM

I've updated the issue 15480 to include a example project to illustrate the problem.

http://avalondock.codeplex.com/workitem/15480

Aug 19, 2012 at 3:25 PM

Bump.

Just a friendly reminder that the Following issues (15480 and  15508) are still present in build 2.0.1370:

http://avalondock.codeplex.com/workitem/15480

http://avalondock.codeplex.com/workitem/15508

Thanks

 

Aug 23, 2012 at 6:43 PM
Edited Aug 23, 2012 at 8:02 PM

I've finally been able to fix my issue by adding the following code in both LayoutAnchorablePaneControl.cs and LayoutDocumentPaneControl.cs:

 protected override void OnPreviewMouseUp(System.Windows.Input.MouseButtonEventArgs e)
        {
            if (_model != null && _model.SelectedContent != null && this.IsMouseOver && e.ChangedButton == System.Windows.Input.MouseButton.Left)
                _model.SelectedContent.IsActive = true;

            base.OnPreviewMouseUp(e);
        }

I've updated the workitem with the same comment, i hope this works well.

Sep 5, 2012 at 2:32 PM

Hi Ado, i know im annoying with this bug, but i was wondering if this proposed fix would be included in the next version?

Right now i need to add the code on every published version :)

Slick

Sep 12, 2012 at 1:50 PM

Hi, I think this issue could be closed as fixed, could please confirm? thanks

Sep 12, 2012 at 2:12 PM

Yes it's fixed.

 

Thanks!