Forum Xamarin.Forms

Passing values between 2 opened pages

kotetotemkotetotem Member ✭✭

Hey, so in my application I am using Master and Detail page. When Detail page opens I will go to the Master (slides from the left side) and I check checkbox. I want that value pass to my Detail page. In debug mode I can see method clearly called and good value is there, but when it ends, nothing happens, can you help me?

private void Button_CheckedChanged(object sender, CheckedChangedEventArgs e)
if (ckeck.IsChecked == true)
Page2 p2= new Page2 ();
p2.dajCheck("value", true);
Page2 p2= new Page2 ();
p2.dajCheck("spomenici", false);

This is send value from Master to Detail, is it a good way?
I can't find anything else...

THX! :-)

Best Answers


  • bloodtearbloodtear Member ✭✭

    try to pass value to another page using: method below (many method)
    Page2 p2= new Page2 (abc);
    public partial class Page2 : ContentPage
    string mess;
    public MainPage(string str)

  • kotetotemkotetotem Member ✭✭

    Thank you @JohnHardman and @LandLu MessagingCenter is awsome!

    How did I miss it??!!

    Gonna use it all over my app, thx! :-D

  • LandLuLandLu Member, Xamarin Team Xamurai

    @kotetotem If you felt it working for you please accept them as answers to complete this thread.

Sign In or Register to comment.