I would like to install a ListView into a Group on the Navigation Control (under Windows at present). The reason is that we have a ToDo list in our application, showing it via the Navigation control would allow it to be available to a user all the time.
So, I have successfully added a control to the NavBar through a Window Controller and have then extended that to add a GridControl bound to an XPCollection however this is of course very dirty and does not keep to XAF standards allowing the view to be modified via the Model etc.
So I wouuld be very grateful for any guidance you might give on how I would get a ListView to appear in a Group in the NavBar.
I have included the sample project I have been playing with using the GridControl if it is of any assistance.
Many thanks Dennis, an excellent answer as ever.
For anyone interested here is the code that did it (from within a WindowController) and changes the ListView to use a CardView due to the space limitations:-
Private Sub CreateToDoControl(ByVal group As NavBarGroup)
Dim frame As Frame = Application.CreateFrame(TemplateContext.NestedFrame)
Dim template As IFrameTemplate = CType(frame.Template, IFrameTemplate)
Dim objectSpace As ObjectSpace = Application.CreateObjectSpace
Dim listView As DevExpress.ExpressApp.ListView = Application.CreateListView(objectSpace, GetType(Reminder), True)
AddHandler listView.ControlsCreated, AddressOf view_ControlsCreated
CType(frame.Template, Control).Dock = DockStyle.Fill
Private Sub view_ControlsCreated(ByVal sender As Object, ByVal e As EventArgs)
Dim view As DevExpress.ExpressApp.ListView = CType(sender, DevExpress.ExpressApp.ListView)
Dim grid As GridControl = CType(view.Control, GridControl)
grid.MainView = New Card.CardView(grid)
Obviously it needs a bit of work for error checking, configure the CardView, Actions etc. but we have a ListView sat comfortably in the navigation bar.