Beispiel #1
0
        void OnClick(object sender, System.EventArgs e)
        {
            var page = new TargetPage();

            // If we had instance of target page

            //page.SliderValueChanged += OnSliderValueChanged;

            // If we have not the instance of target page, use Messaging center
            MessagingCenter.Subscribe <TargetPage, double>(this, Events.SliderValueChanged, OnSliderValueChanged);

            Navigation.PushAsync(page);


            //MessagingCenter.Unsubscribe<SubscriberPage>(this, Events.SliderValueChanged);
        }
Beispiel #2
0
 private void OnSliderValueChanged(TargetPage source, double newValue)
 {
     label.Text = newValue.ToString();
 }