18.02 Add Genre Lform to navigation bar (XAMARIN) - chempkovsky/CS2WPF-and-CS2XAMARIN GitHub Wiki

  • Open "Views\MainFlyoutPage.xaml"-file of the PrismDemoApp-project
  • Modify content of StackLayout as shown:
                <StackLayout Padding="20" >
                    <Button BackgroundColor="Transparent" Text="Home"             Command="{Binding NavigateCommand}" CommandParameter="HomePage" />
                    <Button BackgroundColor="Transparent" Text="Access Denied"    Command="{Binding NavigateCommand}" CommandParameter="AccessDeniedPage" />
                    <Button BackgroundColor="Transparent" Text="Page Not Found"   Command="{Binding NavigateCommand}" CommandParameter="PageNotFoundPage" />
                    <Button BackgroundColor="Transparent" Text="Register User"    Command="{Binding NavigateCommand}" CommandParameter="RegisterUserPage" />
                    <Button BackgroundColor="Transparent" Text="Login User"       Command="{Binding NavigateCommand}" CommandParameter="LoginUserPage" />
                    <Button BackgroundColor="Transparent" Text="Logout User"      Command="{Binding NavigateCommand}" CommandParameter="LogoutUserPage" />
                    <Button BackgroundColor="Transparent" Text="Change Password"  Command="{Binding NavigateCommand}" CommandParameter="ChngpswdUserPage" />

                    <Button BackgroundColor="Transparent" Text="Show Dialog"      Command="{Binding ShowDialogCommand}" CommandParameter="MessageDlg" />

                    <Label Text="Genre"/>
                    <Button BackgroundColor="Transparent"  Text="L Dialog"  Command="{Binding ShowDialogCommand}" CommandParameter="LitGenreViewLdlgViewModel" />
                    <Button BackgroundColor="Transparent"  Text="R Page"    Command="{Binding NavigateCommand}" CommandParameter="LitGenreViewRlistPage" />
                    <Button BackgroundColor="Transparent"  Text="Rd Page"   Command="{Binding NavigateCommand}" CommandParameter="LitGenreViewRdlistPage" />
                    <Button BackgroundColor="Transparent"  Text="O2m Page"  Command="{Binding NavigateCommand}" CommandParameter="LitGenreViewO2mPage" />
                    

                </StackLayout>
  • rebuild
    • PrismDemoApp
  • run PrismDemoApp
  • In the app click "R Page"-menu item of "Genre"-block and add a pair of records

picture

or UWP picture