1、xaf 自定义控件跳转到ListView:
ShowViewParameters svp = new ShowViewParameters();
//卡顿
// svp.CreatedView = xafApplication.CreateListView(xafApplication.CreateObjectSpace(),typeof(CourseTrail),false);
//不卡顿
svp.CreatedView = xafApplication.CreateListView( typeof(CourseTrail), false);
xafApplication.ShowViewStrategy.ShowView(svp, new ShowViewSource(null, null));
//跳转后关闭控件所在的view
this.ParentForm.Dispose();
2、跳转到DetailView
CourseTrail course = objectSpace.FindObject<CourseTrail>(CriteriaOperator.Parse("CourseName=?", courseTrail.CourseName));
ShowViewParameters svp = new ShowViewParameters();
svp.CreatedView = xafApplication.CreateDetailView(xafApplication.CreateObjectSpace(), course);
xafApplication.ShowViewStrategy.ShowView(svp, new ShowViewSource(null, null));