예제 #1
0
        private void OpenMyLayerWinCommandClick()
        {
            var dd = new Demo1();

            dd.Width  = 500;
            dd.Height = 300;
            var vm = new Demo1ViewModel();

            //设置20秒后关闭弹出窗体
            MyTime.SetTimeout(10000, () =>
            {
                ClosePopup.Request();
            });
            MyLayerServices.ShowDialog("Demo1", dd, vm, OnDialogCloseCallBack, new MyLayerOptions()
            {
                MaskBrush     = SolidColorBrushConverter.From16JinZhi("#4F000000"),
                CanDrag       = IsCandrag,
                HasShadow     = HasShadow,
                AnimationType = SelectedAnimationType.Key
            },
                                       delegate//窗体呈现完毕后执行的委托方法
            {
                vm.Load();
            },
                                       ClosePopup//后台要关闭弹出窗口,只需要执行此InteractionRequest的Request()方法
                                       );
        }
예제 #2
0
 private void OnDialogCloseCallBack(Demo1ViewModel vm)
 {
     MessageBox.Show("被主窗体关闭了");
 }