.NET 學習

.NET 學習生活感想... 万事成蹉跎..... 贵在坚持 及时整理自己做过和学过的东西

博客园 首页 新随笔 联系 订阅 管理
 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;
        }
    }

 

posted on 2015-01-24 10:36  Tonyyang  阅读(478)  评论(1编辑  收藏  举报
欢迎转载,转载请注明出处:http://www.cnblogs.com/Tonyyang/