Hi,
I am using XamDockManager to open detail view from a Call List Grid . I have created a Behavior to Bind Dockmanager's panegroup to a Collection of Items and based on a property IsPinned in Viewmodel I control that only one Item at a time should be pinned/docked and all others should be floating if there exists multiple .
That means multiple detail pages could be opened at the same time . when a window is undocked/floated ,view is automatically move back to call list grid.
The issue is if i open a detail item and undock it and then open another detail item it opens fine . but if a open a detail item and click back button which remove that item from the collection itemsource that makes itemsource count 0 .now if i open a detail item again it won't show up .
The issue is somewhere with the behavior, as long as the itemsource count is greater than zero , means at least one detail window is kept open in floating mode. switching between calllistview and detail view works fine. but when itemsource count is zero. means all detail tabs are closed . then opening detail does not work .
I have attached a test project please have a look,
there is a button unpin and another button back . unpin will make the window floating and back with remove current item from collection and move back to call list grid.
Its not a good MVVM scenario but just a POC to use commands.
Main Grid name is CallListGrid.
Hi Any Suggestions on this one , how this could be fixed?
Thanks
Hello Gottfried and thank you for posting!
After investigating the project you have shared I noticed that when all details items are closed the underlying data is removed. This result in SplitPane and TabGroupPane being also removed from the visual tree. When new data is added the ContentPane does not have a parent to attach to and it is not displayed in the XamDockManager. You can make sure that if no SplitPane was set when the open button was clicked it will be added. That will display the ContentPane even in scenarios when all the previously loaded panes were removed.
Hi Maria,
Thanks That solved my problem.
Thank you for your feedback Gottfried.
I am glad that it helped.