Error on guard clause with Caliburn.Micro
I am trying to implement so guard handling with Caliburn.Micro but I am getting an invalid cast exception when the application runs. The Property: public Account UserAccount { get { return account; } set { account = value; NotifyOfPropertyChange(() => UserAccount); NotifyOfPropertyChange(() => CanSaveAndNavigateToComposeView()); } } The Method: public void SaveAndNavigateToComposeView() { CommitAccountToStorage(); navigationService.UriFor<ComposeViewModel>().Navigate(); } The Guard: public bool CanSaveAndNavigateToComposeView() { return !(string.IsNullOrEmpty(UserAccount.DisplayName) || string