void InitializeNavigation() { DevExpress.XtraEditors.WindowsFormsSettings.SetDPIAware(); DevExpress.XtraEditors.WindowsFormsSettings.EnableFormSkins(); DevExpress.XtraEditors.WindowsFormsSettings.AllowPixelScrolling = DevExpress.Utils.DefaultBoolean.True; DevExpress.XtraEditors.WindowsFormsSettings.ScrollUIMode = DevExpress.XtraEditors.ScrollUIMode.Touch; DevExpress.LookAndFeel.UserLookAndFeel.Default.SetSkinStyle("Office 2013 Light Gray"); mvvmContext.RegisterService(DocumentManagerService.Create(navigationFrame)); DevExpress.Utils.MVVM.MVVMContext.RegisterFlyoutDialogService(); // We want to use buttons in Ribbon to show the specific modules var fluentAPI = mvvmContext.OfType <MMPPL.ViewModels.MMPPLDBEntitiesViewModel>(); fluentAPI.BindCommand(navigationBarItemColorMasterCollectionView, (x, m) => x.Show(m), x => x.Modules[0]); fluentAPI.BindCommand(barButtonItemColorMasterCollectionView, (x, m) => x.Show(m), x => x.Modules[0]); fluentAPI.BindCommand(navigationBarItemCustmerMasterCollectionView, (x, m) => x.Show(m), x => x.Modules[1]); fluentAPI.BindCommand(barButtonItemCustmerMasterCollectionView, (x, m) => x.Show(m), x => x.Modules[1]); fluentAPI.BindCommand(navigationBarItemDispatchCollectionView, (x, m) => x.Show(m), x => x.Modules[2]); fluentAPI.BindCommand(barButtonItemDispatchCollectionView, (x, m) => x.Show(m), x => x.Modules[2]); fluentAPI.BindCommand(navigationBarItemGradeMasterCollectionView, (x, m) => x.Show(m), x => x.Modules[3]); fluentAPI.BindCommand(barButtonItemGradeMasterCollectionView, (x, m) => x.Show(m), x => x.Modules[3]); fluentAPI.BindCommand(navigationBarItemLabelPrintingCollectionView, (x, m) => x.Show(m), x => x.Modules[4]); fluentAPI.BindCommand(barButtonItemLabelPrintingCollectionView, (x, m) => x.Show(m), x => x.Modules[4]); fluentAPI.BindCommand(navigationBarItemMicronMasterCollectionView, (x, m) => x.Show(m), x => x.Modules[5]); fluentAPI.BindCommand(barButtonItemMicronMasterCollectionView, (x, m) => x.Show(m), x => x.Modules[5]); fluentAPI.BindCommand(navigationBarItemSizeMasterCollectionView, (x, m) => x.Show(m), x => x.Modules[6]); fluentAPI.BindCommand(barButtonItemSizeMasterCollectionView, (x, m) => x.Show(m), x => x.Modules[6]); fluentAPI.BindCommand(navigationBarItemDuplicatePrintingCollectionView, (x, m) => x.Show(m), x => x.Modules[7]); fluentAPI.BindCommand(barButtonItemDuplicatePrintingCollectionView, (x, m) => x.Show(m), x => x.Modules[7]); fluentAPI.BindCommand(navigationBarItemStockReportCollectionView, (x, m) => x.Show(m), x => x.Modules[8]); fluentAPI.BindCommand(barButtonItemStockReportCollectionView, (x, m) => x.Show(m), x => x.Modules[8]); // We want show the default module when our UserControl is loaded fluentAPI.WithEvent <EventArgs>(this, "Load") .EventToCommand(x => x.OnLoaded(null), x => x.DefaultModule); }