[XAF] Keep the DetailView open in a popup window

 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

上一篇:装载双系统


下一篇:错误代码0x00000001,好多软件连不了网,求助~(WIN7/win8/win9/win10)