开发者

IDialogService in design time

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?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜