I was fallowing Mix 2011 MVVM Deep dive talk and try to implement IDialogService interface to display messages and common loading bars... etc, but I found bit troubling assignment DialogService to ViewModel thru Views constructor. like this
((MasterViewModel) 开发者_Python百科DataContext).DialogService = (IDialogService) App.Current;
This causing InvalidCastException in designg time, do you have any idea how to fix this?
Thanks
Tried using an 'as' instead of a cast?
精彩评论