Thank you Li for that leed. I will follow up on it.
I am very new to CM so I'm experimenting a lot.
Interestingly enough, I was also looking up methods in the ViewModel that I could override. Here's a little tid bit that may be useful.
When I change the Shell's size and location (Top, Left, Width, Height) in the Startup method the shell displays once and then moves to the location defined in the Startup Method of the bootstrapper. So this, did not work for me. I was thinking that it might be better to set the size and location of the shell in the viewmodel since it's the viewmodel that will display the view (Viewmodel first). I override the OnViewAttached method and set the size of the shell there. This way the size and location is changed before it is displayed by CM. This seems to works great. Here's the method. It just seems more natural for the viewmodel to control the view instead of the bootstrapper.
protected override void OnViewAttached(object view, object context) { base.OnViewAttached(view, context); ShellView shellView = view as ShellView; //Get window size from Isolated storage in UserSettings _appSettings = SettingsSerializer.Deserialize(_Name); shellView.Top = _appSettings.ShellTop; shellView.Left = _appSettings.ShellLeft; shellView.Width = _appSettings.ShellWidth; shellView.Height = _appSettings.ShellHeight; }
Hope this is useful,
Richard