so I have a control whose panel attaches these events inside the panel's initialized event:
gvvm = DataContext as GraphViewerViewModel;
gvvm.ZoomToFitEvent += new EventHandler(_GraphViewerViewModel_ZoomToFitEvent);
gvvm.ZoomInEvent += new EventHandler(_GraphViewerViewModel_ZoomInEvent);
gvvm.ZoomOutEvent += new EventHandler(_GraphViewerViewModel_ZoomOutEvent);
gvvm.CloseVCDEvent += new EventHandler(gvvm_CloseVCDEvent);
gvvm.LoadVCDEvent += new EventHandler(gvvm_LoadVCDEvent);
gvvm.ScrollToTimeEvent += new EventHandler<GraphViewerViewModel.ScrollToTimeEventArgs>(gvvm_ScrollToTimeEvent);
Question 1. When should I detach the events? Is is appropriate to do so in panel.unloaded?
question 2. Is it appropriate to use events to communicate from your view model to your view? it seemed more reasonable than creating a property bool and doing actions in the panel based on the propertychanged event, though that has the advantage of not requiring me to subscribe/unsubscribe events. But the downside is I have to think of reasonable names for a property event toggle.