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