Forum Xamarin.Forms

Command Bindings ignored on Modal Popup Page

AndrewPriceAndrewPrice USMember
edited August 2016 in Xamarin.Forms

I have a Photo app (Attached) that is used to take pictures using the native code (iOS ) implimentation

The App.xaml.cs is

public App() { MainPage = new NavigationPage(new StartPage()); }

The Start Page has 2 buttons when clicking the Buttons PushAsync loads the TakePicturePage as an Async page and the photo button works.

private async void FullScreen_Clicked(object sender, EventArgs e) { await Navigation.PushAsync(new TakePicturePage(), true); }

and the PushModalAsync loads the Page as a Modal popup, but the Photo button doesnt work.

private async void Modal_Clicked(object sender, EventArgs e) { await Navigation.PushModalAsync(new TakePicturePage(), true); }

The code is as follows for TakePicturePage is as follows

public TakePicturePage() { InitializeComponent(); BindingContext = new TakePictureViewModel(DependencyService.Get<ICameraProvider>()); }


     <ContentPage xmlns="" xmlns:x=""         x:Class="CameraApplication.Views.TakePicturePage">
                      <Button Text="Take a Picture Test" Command="{Binding TakePicture}" />
                      <Image Source="{Binding Picture}"/>


  • JohnMillerJohnMiller USForum Administrator, Xamarin Team Xamurai


    It's working for me on iOS. I did notice that your Xamarin.Forms packages are outdated and different versions are installed between all 3 projects. Update those to be the latest and the same.

  • AndrewPriceAndrewPrice USMember

    Thanks @JohnMiller for giving it a go, what version are you running it on ?

Sign In or Register to comment.