예제 #1
0
        /// <summary>
        /// 关闭View【通过消息关闭View】
        /// </summary>
        protected void CloseView()
        {
            CloseViewOfNewWindowArgs args = new CloseViewOfNewWindowArgs(ViewModelID);

            //发送关闭View消息
            MsgAggregation.Instance.SendNavigationMsgForCloseWindow(args);
        }
예제 #2
0
 /// <summary>
 /// 关闭窗口
 /// </summary>
 /// <param name="args">参数</param>
 public void SendNavigationMsgForCloseWindow(CloseViewOfNewWindowArgs args)
 {
     GalaSoft.MvvmLight.Threading.DispatcherHelper.CheckBeginInvokeOnUI(() =>
     {
         GalaSoft.MvvmLight.Messaging.Messenger.Default.Send <CloseViewOfNewWindowArgs>(args, SystemKeys.CloseWindow);
     });
 }
예제 #3
0
 //通过消息关闭打开的窗体
 private void CloseWindowCallback(CloseViewOfNewWindowArgs args)
 {
     WindowHelper.Instance.RemoveOpenedWindowAndCleanUp(args.CloseViewModelID, true);
 }