Equivalent for ItemRealized event

Thread is closed for posting
3 posts, 0 answers
  1. Marvyn
    Marvyn avatar
    3 posts
    Member since:
    Jan 2014

    Posted 26 Jan 2014 Link to this post

    I'm replacing my custom LongListSelector with a RadConversationView, and I would like to replicate the functionality of loading older messages when the oldest available has been prepared/shown.

    To do this, I used to have a Trigger that attached to the ItemRealized event of the LLS and invoked the associated action.

    How could I do this with RadConversationView? I don't seem to have access to this type of event from the control as the AssociatedObject in the trigger.
  2. Marvyn
    Marvyn avatar
    3 posts
    Member since:
    Jan 2014

    Posted 26 Jan 2014 in reply to Marvyn Link to this post

    I managed to subclass RadConversationView and expose the underlying ListBox's ScrollStateChanged event and TopVisibleItem property. With this, I can detect when I'm at the top and load more items.

    The new problem I have is that loading more items (i.e. inserting new items to my ObservableCollection at index 0) makes the control scroll up to show the first of the older items. I would like the scroll viewer to stay put. Is this possible?
  3. Kiril Stanoev
    Kiril Stanoev avatar
    1512 posts

    Posted 29 Jan 2014 Link to this post

    Hi Marvyn,

    Try setting the KeepLastMessageVisible property to False and let us know how it goes.

    Kiril Stanoev
    If you want to get updates on new releases, tips and tricks and sneak peek previews directly from the developers working on the UI for Windows Phone, subscribe to the blog feed now.
Back to Top