locked
Problem with VirtualizingStackPanel.VirtualizationMode="Recycling" inside flipview RRS feed

  • Question

  • Hello,

    Inside my flipview I have set VirtualizingStackPanel.VirtualizationMode="Recycling" ,and there is two control in my flipview item template image and a textbox, if I make textbox of first image visible than it also makes 4th item textbox visible and so on...(8,16 ....). And the textbox of the 4th item is a reference of first item so I cannot make it collapsed on selectionchanged event .

    I also tried to make virtualizationmode to "Standard" but it lead to other problem which is not suitable to my scenario,

    Thanks in advance.









    • Edited by zee_patel Friday, February 14, 2014 5:20 AM
    Thursday, February 13, 2014 6:20 AM

Answers

All replies

  • This is expected in all virtualizing controls, as the control reuses containers as new items are loaded into containers that go off-screen. You should either use a non-virtualized control, or you may be able to determine when the item comes into view to tell it how it should display at the correct time.

    Matt Small - Microsoft Escalation Engineer - Forum Moderator
    If my reply answers your question, please mark this post as answered.

    NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined objects and unknown namespaces.


    Thursday, February 13, 2014 1:27 PM
    Moderator
  • Hi matt,

    Thanks for the reply.

    Due to the performance reason I have to virtualize it ,if you can post the code sample for this problem than it will be really helpful.

    Friday, February 14, 2014 7:34 AM
  • The LongListSelector supports events that fires when an item is put into a container (realized) or removed froma container (unrealized) for a new item:

    You may be able to use these events instead of the virtualizing stackpanel.


    Matt Small - Microsoft Escalation Engineer - Forum Moderator
    If my reply answers your question, please mark this post as answered.

    NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined objects and unknown namespaces.

    Thursday, February 20, 2014 4:51 PM
    Moderator
  • Hi Matt,

    But as per my knowledge LongListSelector is only available for windows phone and it is not available for windows store app. please correct me if I am misunderstanding.


    • Edited by zee_patel Friday, February 21, 2014 5:36 AM
    Friday, February 21, 2014 5:36 AM
  • You're right... I get mixed up between phone and Store apps since I cover both. Let me check into this today and see if I can figure something out for you.

    Matt Small - Microsoft Escalation Engineer - Forum Moderator
    If my reply answers your question, please mark this post as answered.

    NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined objects and unknown namespaces.

    Friday, February 21, 2014 12:47 PM
    Moderator
  • Hi matt, did you find any solution for this problem?

    • Edited by zee_patel Tuesday, February 25, 2014 5:45 AM
    Tuesday, February 25, 2014 5:44 AM
  • I'm sorry, I've got a lot going on. I'll get to this as soon as I can but it may be a couple of days.

    Matt Small - Microsoft Escalation Engineer - Forum Moderator
    If my reply answers your question, please mark this post as answered.

    NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined objects and unknown namespaces.

    Wednesday, February 26, 2014 2:54 PM
    Moderator
  • There are two types of Virtualization: UI and Data.

    UI virtualization means that you are recycling the UI container as one goes offscreen, then comes back onscreen.The entire dataset for the list is kept in memory. This is the scenario you are encountering that changing the properties of one element of the FlipView causes a problem on another element in the underlying list - the container is reused so it retains the same properties. 

    Data virtualization means that you pull data in from the datasource as it's needed - and I am wondering if you need this kind instead of UI virtualization. 

    A better description of these types of data virtualization is here:
    http://msdn.microsoft.com/en-us/library/windows/apps/hh780657.aspx


    Matt Small - Microsoft Escalation Engineer - Forum Moderator
    If my reply answers your question, please mark this post as answered.

    NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined objects and unknown namespaces.

    Thursday, March 6, 2014 3:06 PM
    Moderator
  • Hi Matt,

    Thanks for the description ,I referred to that link but there is no details for implementing  data virtualization . Is there any sample code which shows the use data virtualization.


    • Edited by zee_patel Friday, March 7, 2014 5:38 AM
    Friday, March 7, 2014 5:35 AM
  • I'm thinking this post will help:
    http://social.msdn.microsoft.com/Forums/windowsapps/en-US/8f7a1a5b-6a8d-4971-8f38-2075295298b5/data-virtualization-example-using-isupportincrementalloading?forum=winappswithcsharp

    Matt Small - Microsoft Escalation Engineer - Forum Moderator
    If my reply answers your question, please mark this post as answered.

    NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined objects and unknown namespaces.

    • Marked as answer by zee_patel Friday, March 7, 2014 1:36 PM
    Friday, March 7, 2014 1:32 PM
    Moderator