57 Add Country O2m to navigation bar (Wpf) - chempkovsky/CS2WPF-and-CS2XAMARIN GitHub Wiki

  • Open "ViewModels\MainWindowViewModel.cs"-file of the PrismDemoApp-project
  • Modify _MainMenu variable as shown
IEnumerable<IWebServiceFilterMenuInterface> _MainMenu = new ObservableCollection<IWebServiceFilterMenuInterface>()
{
  new WebServiceFilterMenuViewModel() { Id = "000", Caption="Home", IconName="Home",  IconColor="Primary", Data="HomeUserControl", Command=RoutedCommandExt.MainMenuCommand},
  new WebServiceFilterMenuViewModel() { Id = "001", Caption="LitGenre Lform", IconName="TableRefresh",  IconColor="Primary", Data="LitGenreViewLformUserControl", Command=RoutedCommandExt.MainMenuCommand},
  new WebServiceFilterMenuViewModel() { Id = "001", Caption="LitEdition Lform", IconName="TableRefresh",  IconColor="Primary", Data="LitEditionViewLformUserControl", Command=RoutedCommandExt.MainMenuCommand},
  new WebServiceFilterMenuViewModel() { Id = "001", Caption="Country Lform", IconName="TableRefresh",  IconColor="Primary", Data="LitCountryViewLformUserControl", Command=RoutedCommandExt.MainMenuCommand},
  new WebServiceFilterMenuViewModel() { Id = "001", Caption="Language Lform", IconName="TableRefresh",  IconColor="Primary", Data="LitLanguageViewLformUserControl", Command=RoutedCommandExt.MainMenuCommand},
  new WebServiceFilterMenuViewModel() { Id = "001", Caption="Dialect Lform", IconName="TableRefresh",  IconColor="Primary", Data="LitDialectViewLformUserControl", Command=RoutedCommandExt.MainMenuCommand},
  new WebServiceFilterMenuViewModel() { Id = "001", Caption="Country O2m form", IconName="TableRefresh",  IconColor="Primary", Data="LitCountryViewO2mUserControl", Command=RoutedCommandExt.MainMenuCommand},

};
  • rebuild
    • ModelInterfacesClassLibrary
    • ModelServicesPrismModule
    • PrismDemoApp
  • run Dm04WebApp
  • run PrismDemoApp
  • In the app click "Country O2m form"-menu item and add a pair of records to the dialect-panel

picture