Questions tagged [virtualizingstackpanel]

Arranges and virtualizes content on a single line that is oriented either horizontally or vertically.

The standard layout system creates item containers and computes layout for each item associated with a list control. The word "virtualize" refers to a technique by which a subset of user interface (UI) elements are generated from a larger number of data items based on which items are visible on-screen. Generating many UI elements when only a few elements might be on the screen can adversely affect the performance of your application. The VirtualizingStackPanel calculates the number of visible items and works with the ItemContainerGenerator from an ItemsControl (such as ListBox or ListView) to create UI elements only for visible items.

88 questions
2
votes
2 answers

VirtualizingStackPanel doesn't clear the text of TextBoxes in the ItemTemplate

I have ItemsControl with VirtualizingStackPanel as items panel like this:
EvAlex
  • 2,888
  • 1
  • 20
  • 24
2
votes
2 answers

"BindingExpression path error" using ItemsControl and VirtualizingStackPanel

I'm using Silverlight on Windows Phone 7. Is it normal to get loads of "BindingExpression path error" debug messages when using a VirtualizingStackPanel? I think it is happening because the visual items are temporarily unbound from the data items…
Damian
  • 4,723
  • 2
  • 32
  • 53
2
votes
1 answer

Proper usage of VirtualizingStackPanel in WPF

Can somebody please tell me how to properly use the VirtualizingStackPanel in WPF ? I've set a VirtualizingStackPanel in my ItemsPanelTemplate for my ItemsControl, and set it as my ItemsHost, but when I register a listener for the…
Alex Marshall
  • 10,162
  • 15
  • 72
  • 117
2
votes
1 answer

WPF - VirtualizingStackPanel requests all items when going into editing mode in DataGrid

I am using a DataGrid with CellEditingTemplates. As ItemsSource a data virtualized collection is used (the AlphaChiTech solution), which only fetches pages of a size of 100 items at a time on demand. It works great until a cell is double clicked…
Dima
  • 340
  • 3
  • 12
2
votes
0 answers

Visual defect in VirtualizingStackPanel in FlipView WP 8.1

In my project i am working with FlipView with collection of images. For better performance i am using VirtualizingStackPanel and it working fine, but i noticed strange behavior of last item of collection in flipview. If i am scrolling to last item…
RenDishen
  • 928
  • 1
  • 10
  • 30
2
votes
0 answers

VirtualizingStackPanel with IsPixelBased=true and correct thumb sizes?

I'm using an itemscontrol to hold a number of controls of varying size. I decided to enable virtualizing due to the number of controls I need to display (it was taking a second or so to "Load" the control in some cases, and I really need to display…
wforl
  • 843
  • 10
  • 22
2
votes
1 answer

How to keep Virtualizing when style ControlTemplate of ListBox?

I read that when styling incorrectly, ListBox will lose its virtualization. As notacat's answer in this question, his solution is OK. I realize that whenever I put ItemsPresenter in another container, such as Grid, Border, ...
2
votes
2 answers

virtualizing nested containers (virtualizingstackpanel) to a single parent scrollbar in WPF

I've kind of coded myself into a pickle on this one. I am writing a custom WPF control which is similar to the TreeListView described in This MSDN article as well as many other places on the net. A pretty big pile of this thing is custom at this…
David Hay
  • 3,027
  • 2
  • 27
  • 29
1
vote
1 answer

virtualizingstackpanel and height

If I have a virtualizingstackpanel inside of my scrollviewer then how does my scrollviewer know what height the scrollbar needs to be? For example if I have 10,000 items how does it know that I have only scrolled 5 percent down the list? What if I…
Xander
  • 9,069
  • 14
  • 70
  • 129
1
vote
2 answers

Virtualizing WrapPanel for WP7

I need to create a wrap panel with my facebook friends, meaning the itemcount is over 400, and it takes 5-10 seconds for all the items to load.
Igor Meszaros
  • 2,081
  • 2
  • 22
  • 46
1
vote
1 answer

WPF ListBox VirtualizingPanel

I need some advice. I am trying to create a ListBox with an expanded detail item. I have also created VirtualizingTilePanel but unfortunately items in the ListBox do not move so that the detail of the item is not visible. I tried it with…
user6473719
1
vote
4 answers

WP7: When does the ListBox use VirtualizingStackPanel?

Everybody says the default ItemsPanel for a ListBox is a VirtualizingStackPanel. I created a ListBox-derived class (call it MyListBox) and it defaults to StackPanel instead. I mean I have to force the virtualization, for example this way: const…
Jan Slodicka
  • 1,505
  • 1
  • 11
  • 14
1
vote
0 answers

KB4013198 Causes StackOverflowException in VirtualizingStackPanel

I have a customer who is on Windows 10 v1511 (i.e., not the Anniversary Update). After installing update KB4013198, my WPF application now crashes periodically when scrolling a ListBox employing a VirtualizingStackPanel. I was able to build a VM…
David Mullin
  • 688
  • 1
  • 8
  • 21
1
vote
1 answer

WPF - Need an event for when VirtualizingStackPanel creates Items for ListView

Is there any way to tell when the containers are finished being made for a ListView? A detailed explanation of what I've done so far I have a ListView control that has a DataTemplate in one of its columns that contains a CheckBox Control.. I've…
Ryan
  • 241
  • 1
  • 5
  • 14
1
vote
1 answer

wpf - HierarchicalDataTemplate, VirtualizingStackPanel, Window Resize (maximize)

I am having a problem with a wpf treeview that uses a HierarchicalDataTemplate in conjunction with a VirtualizingStackPanel. Using the code provided below, I run the application and expand all the treeviewitems. …