公司项目要逐步从winform过渡到WPF,写帖子记录知识点。 虽然可能错了,但与各位共享,共同成长,投稿不断更新。
winform :
if (this.invoke请求) this.invoke ) newactionstring(setmessage ),message ); }else{} wpf:
var dispather=this.Dispatcher; if(dispatcher.checkaccess () this.dispatcher.invoke ) newactionstring(setmessage ),message ); }else{} winform :
this.dialogresult==system.windows.forms.dialogresult.cancel; this.dialogresult==system.windows.forms.dialogresult.ok; wpf:
this.DialogResult==false; this.DialogResult==true; winform :
this.Handle wpf:
newwindowinterophelper(this ).Handle