RadSlideView: SlidedToIndex - MessagingCenter endless loop

2 posts, 0 answers
  1. Brian
    Brian avatar
    3 posts
    Member since:
    Dec 2013

    Posted 03 Oct 2018 Link to this post

    Not sure what I'm doing wrong. I have a SlideView and hooked up the SlidedToIndex event. 

     public void Handle_SlidedToIndex(object sender, Telerik.XamarinForms.Primitives.SlideView.SlideViewSlidedToIndexEventArgs e) { 

                System.Diagnostics.Debug.WriteLine("********************  SegmentSliding Index " + e.Index + "  *********************");
     }

    This works fine, if I add a  MessagingCenter.Send to it, I ended up in an endless loop. 

     public void Handle_SlidedToIndex(object sender, Telerik.XamarinForms.Primitives.SlideView.SlideViewSlidedToIndexEventArgs e) { 
                System.Diagnostics.Debug.WriteLine("********************  SegmentSliding Index " + e.Index + "  *********************");     MessagingCenter.Send(new UserInterfaceTaskMessage { InterfaceTask = "SegmentChanged", Message = selectedIndex.ToString() }, "UserInterfaceTaskMessage");

    My MessageCenter has a subscribe that I'm not doing anything with yet... no code..   Just trying to report back to the view model that the index changed so that I can clear another control. 

    Any help would be great... 

     

  2. Brian
    Brian avatar
    3 posts
    Member since:
    Dec 2013

    Posted 03 Oct 2018 in reply to Brian Link to this post

    Have no idea why the endless loop but I did fix my issue with a two way binding to selectedindex. 

    Thanks 

Back to Top