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; } }
欢迎转载,转载请注明出处:http://www.cnblogs.com/Tonyyang/