简体   繁体   中英

Navigate through MLToolkit.Forms.SwipeCardView

I'm developing a Tinder-like app using the MLToolkit.Forms.SwipeCardView nuget. How do I,

  1. Reload the cardView when it reaches the end (or at any time), and start all over again? Using

    SwipeCardView.LoopCards = true;

works, but not exactly what I want.

  1. Undo the last swipe action?
  2. Navigate forward/backward through the cards stack?

I'll answer question no.1 myself. After a few trials, I found a simple method to restart or to refresh the SwipeCardView, at anytime. I thought I'd share it here and hope it helps someone. Just simply rebinding it, like so...

swipeCardView1.BindingContext = null;
swipeCardView1.BindingContext = this;

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM