sbaeumlisberger / VirtualizingWrapPanel

Implementation of a comprehensive VirtualisingWrapPanel for WPF
MIT License
254 stars 35 forks source link

[Question] Property for limiting items to display #14

Closed Tenjim closed 3 years ago

Tenjim commented 3 years ago

Hi guys,

Is it possible to have a property to limiting the number items you want to display ? I use that control to display several images and I want to have only two images display and the rest below and accessible by scrolling down.

Kinds Regards, Tenjim

Describe your issue A clear and concise description of what your issue is. If you think that it is a bug, please provide the steps to reproduce (e.g. a code snippet or screenshots).

Version Info Package Version [e.g. 1.5.2] .NET Version: [e.g. .NET Framework 4.7.2] OS Version: [e.g. Windows 10 Build 19041.508]

sbaeumlisberger commented 3 years ago

Hi,

I don't understand what exactly you are trying to achieve. Could you give me more information on how the scenario you describe would look like.

Tenjim commented 3 years ago

Hi @sbaeumlisberger,

I use the VirtualizingWrapPanel with images as itemsource. I just want to know if there is a way to limit the number of object with a property (here images) to be displayed and not virtualized.

For example: I want to display only two images and scroll down to display the next two images from the itemsource.

Thank in advance, Tenjim

sbaeumlisberger commented 3 years ago

Hi Tenjim,

the items (in your case images) that fit into the viewport (the area visible in the UI) are always realized. For items not yet visible there are different caching settings. See here and here for some documentation. You can also have a look into the sample application, there you can try it out. If you have further questions about caching feel free to ask.

In you case it might be enough to limit the size of the control so that only two images fit into the viewport. The caching can also be disabled entirely.

If I misunderstand you and you want to achieve something else, let me know. In that case it would be helpful if you could provide a sample or mockup so that I can understand you scenario.

sbaeumlisberger commented 3 years ago

Closing this issue now because of inactivity. If you still have a problem please let me know.