This example displays the number of List View items in the Navigation Control. When a user adds or deletes List View items, navigation item captions update the record count automatically.
Follow the steps below to customize navigation item captions:
- Create a Window Controller (NavigationObjectCountController.cs).
- In the FrameAssigned event handler, subscribe to the NavigationItemCreated event.
- Use the NavigationItem.Caption event argument property to specify the custom caption (add the number of items).
- Create a View Controller (RefreshNavigationController.cs).
- In the Activated event handler, subscribe to the IObjectSpace.Committed event.
- Call the RecreateNavigationItems method to recreate navigation items whenever underlying data changes.
(you will be redirected to DevExpress.com to submit your response)