Comments (6)
This is a cool idea! I will add it to the new features list. Thanks!
from swipecardview.
If I can find some time I will see to contribute something(s) myself 🙂
from swipecardview.
Thanks @markolazic88 that did the trick.
Regarding reloading the ItemSource list, I've noticed there is some kind of issue with the card rendering. In my scenario I'm pulling new items from my API and replacing the entire ItemSource, the problem is that the last card visible to the user continues visible despite I changed the whole ItemSource list, any idea how to refresh the current visible card to the new one (top one)?
I've tried assiging the TopItem to the First one of the new list, but don't work
from swipecardview.
Hello, just wondering with the current release how can I identify when there are no more cards to swipe? maybe to execute a command or reload the ItemSource when this happens #Thanks
from swipecardview.
@bgaprogrammer In your OnSwipedCommand method you could check if the swiped item equals to the last item in ItemsSource:
private void OnSwipedCommand(SwipedCardEventArgs eventArgs) { var item = eventArgs.Item as string; var noMoreItemsToSwipe = item == CardItems.LastOrDefault(); }
from swipecardview.
Imho an 'empty' card should be handled by the application programmer by pushing one at the end of the stack and disable any functionality in the bindings by checking whether it's the end card, instead of being built into the component (which would complicate it unnecessarily). The app programmer also has a choice of adding a UI element below the deck that gets drawn when the deck is empty, while hiding the swipe view when empty.
The recent fixes to swipe view will set TopItem to null when the deck is empty, making it easy to use bindings to detect this (something like IsVisible={Binding TopItem, Source={x:Reference myDeck}, Converter={StaticResource IsNullConverter / IsNotNullConverter}}.
So TLDR: I don't think it'd be a good idea to build this functionality into the swipe view itself, as it can be handled by the app programmer.
from swipecardview.
Related Issues (20)
- Unable to work on android HOT 8
- Resizing the Card
- Modifying ItemsSource while swiping HOT 2
- Is it possible to order item vertical like in build ListView? HOT 1
- Index out of range Exception HOT 4
- Too fast swipe - blank image on Android sometimes HOT 5
- Problem install NuGet Package HOT 2
- Cards become invisible until XAML is hot reloaded if using OptimizedObservableCollection HOT 5
- SwipeCardView occupies entire vertical area in layout
- Support for multiple ItemTemplate DataTemplates HOT 2
- Please make a new NuGet release HOT 1
- How I can open the desired item programmatically?
- Android 9 forms 4.8 issue
- [enhancement] Tap Gesture Recognition / Select Command Support
- Biding fields not refreshing when ItemSource is changed programatically. HOT 1
- Animate current Card HOT 2
- Is it possible to go back one card? HOT 5
- Graceful handling when ItemsSource is empty HOT 2
- InvokeSwipe swipe all my cards HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from swipecardview.