Ok, so I'm doing a vstudio-like interface using raddocking. I have a pane group on the left and right and mode of the user interaction will be with the right group.
I also have a radmenu and radtoolbar at the top of the main window. I have a File/Close menu option. It's bound to a CloseCommand in my MainWindow's viewmodel but I get stuck there.
Using MVVM, how best to close the RadPane? I can add the EventToCommandBehavior to the xaml. Then I can catch the command in my MainWindow's ViewModel. The problem is that once I'm in the ViewModel, I don't know how to tell the RadPane's View to close the pane in such a way that it's PreviewClose event fires so I can test to see if the user wants to save changes etc. Supposedly, in MVVM, you're not supposed to be playing with UI stuff in the VM.
To put it more simply, I want to ask the user if they need to save changes when the hit file close. I don't see how to do that in a VM without breaking MVVM rules.
Even using the examples seem to break MVVM rules. Passing a radpane to a command seems like it breaks MVVM rules.
Any insight would be greatly appreciated. (BTW, we are using prism). I am new to MVVM and right now, it seems very difficult to do simple stuff.
Thanks ... Ed