c# - Windows Store App - ListView ItemsSource change animation -
after solving flickering issue here windows store app listview flickering / content dispappearing facing animation issue.
to put things in context, building conversation app (chat app) consisting of 2 listviews.
- a left-panel display active threads (list of contacts) ;
- a right-panel display current thread conversation.
as user clicks on thread left-panel, corresponding conversation loaded inside conversation listview. nothing complicated here.
the problem lies animations. i'd stick default built-in animations if possible pleased them , in accordance of metro ui guidelines.
let's assume have 2 threads. first contains 1000 messages conversation, while other one, 100. if click on first thread (the big one), conversation loads fine, default animation. let's assume scroll way bottom read recent messages in messaging app. if click on smaller thread, conversation updated , loaded new conversation collection. default animations occur and, more importantly, no scrolling required: @ bottom !
if try go big thread, left somewhere inside long conversation. default animations occurs, have scroll way bottom.
scrolling bottom can achieved scrollintoview(item). calling method right after changing itemssource content, breaks default animation. more importantly, animations horrible , happen follow : old messages remains still, new ones (from newly loaded conversation) appear on top of old ones old ones disappear. ugly hell.
how can set or use scrollbar stays @ bottom whatsoever, allowing both listview show last entry , using default animation ?
using dispatchertimer produce slight delay (500ms) before calling scrollintoview() allows default animations take place (meaning still there in fact, "overwritten" scrolling) before autoscrolling triggers. it's better previous situation, still weird. there other way ? !
Comments
Post a Comment