码迷,mamicode.com
首页 > Windows程序 > 详细

[XAF] Keep the DetailView open in a popup window

时间:2015-01-24 11:31:14      阅读:257      评论:0      收藏:0      [点我收藏+]

标签:

 public class ViewController1 : ViewController
    {
        ListViewProcessCurrentObjectController controller;
        protected override void OnActivated()
        {
            base.OnActivated();
            controller = Frame.GetController<ListViewProcessCurrentObjectController>();
            controller.CustomizeShowViewParameters += controller_CustomizeShowViewParameters;
        }
        void controller_CustomizeShowViewParameters(object sender, CustomizeShowViewParametersEventArgs e)
        {
            e.ShowViewParameters.TargetWindow = TargetWindow.NewModalWindow;
        }
        protected override void OnDeactivated()
        {
            controller.CustomizeShowViewParameters -= controller_CustomizeShowViewParameters;
            base.OnDeactivated();
        }
    }

    public class MyNewObjectViewController : WinNewObjectViewController
    {
        protected override void New(SingleChoiceActionExecuteEventArgs args)
        {
            base.New(args);
            args.ShowViewParameters.TargetWindow = TargetWindow.NewModalWindow;
        }
    }

 

[XAF] Keep the DetailView open in a popup window

标签:

原文地址:http://www.cnblogs.com/Tonyyang/p/4245525.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!