如何在自己的窗体(控件)中显示XAF的视图

时间:2021-04-27 14:49:06
Form form = new Form();
DevExpress.ExpressApp.View listView = Application.CreateListView(Application.CreateObjectSpace(), typeof(Contact), false);
listView.CreateControls();
form.Controls.Add((Control)listView.Control);
form.ShowDialog(); 下面的示例可以将工具栏等 显示出来:
Form form = new Form();
Frame frame = Application.CreateFrame(TemplateContext.NestedFrame);
frame.CreateTemplate();
DevExpress.ExpressApp.View listView = Application.CreateListView(Application.CreateObjectSpace(), typeof(Contact), false);
frame.SetView(listView);
form.Controls.Add((Control)frame.Template);
form.ShowDialog();

很简单,很牛X。 https://www.devexpress.com/Support/Center/Question/Details/Q571655