Quantcast
Channel: AvalonDock
Viewing all articles
Browse latest Browse all 2690

New Post: [Version 2.0] Handling Tab closure

$
0
0

Hi Steve,
Yes I have and my current example uses it - well I use the event version and the command version.
But to resolve which of the Tabs has caused the controlling viewmodel to be notified needs usage of DocumentClosingEventArgs, which means the controling viewmodel needs a reference to AvalonDock. I was trying to keep such out of the viewmodel.
Even if I bring the LayoutDocumentTabItem's style into the controling viewmodel (ie Conductor One Active) I cannot see how to get the view or viewmodel of the tab that's closing without such a reference.
Its a matter of identifying which of the close buttons in the headers has caused the close.
You can see in the above code example using LayoutDocument as the cast, which is why I suppose Workspace is not called a ViewModel!!
In CM, Workspace is a VM

thanks
John


Viewing all articles
Browse latest Browse all 2690

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>