This question is locked. New answers and comments are not allowed.
Hi,
I'm using the RadDataBoundListBox control to display a large number of images (binding to IEnumerable<byte[]> and using a Converter to display the actual images). Everything seems to be working properly, but I have a requirement to manually scroll through the list using pixel offsets.
I can get the list to scroll with the following code:
private ScrollViewer _listBoxScrollViewer;
_listBoxScrollViewer = listBox.ChildrenOfType<ScrollViewer>().FirstOrDefault();
_listBoxScrollViewer.ScrollToHorizontalOffset(_listBoxScrollViewer.HorizontalOffset + 512);
The problem occurs after scrolling a few times to the right where the items haven't realized yet (due to the virtualization). The problem is that calling ScrollToHorizontalOffset does not actually trigger the realization of the items, so the list becomes blank after scrolling using this method. The only way to trigger the items to realize is to manually touch the RadDataBoundListBox control, which pretty much defeats the purpose.
Is there any way to trigger the item realization when manually scrolling a RadDataBoundListBox with ScrollToHorizontalOffset?
I'm using the RadDataBoundListBox control to display a large number of images (binding to IEnumerable<byte[]> and using a Converter to display the actual images). Everything seems to be working properly, but I have a requirement to manually scroll through the list using pixel offsets.
I can get the list to scroll with the following code:
private ScrollViewer _listBoxScrollViewer;
_listBoxScrollViewer = listBox.ChildrenOfType<ScrollViewer>().FirstOrDefault();
_listBoxScrollViewer.ScrollToHorizontalOffset(_listBoxScrollViewer.HorizontalOffset + 512);
The problem occurs after scrolling a few times to the right where the items haven't realized yet (due to the virtualization). The problem is that calling ScrollToHorizontalOffset does not actually trigger the realization of the items, so the list becomes blank after scrolling using this method. The only way to trigger the items to realize is to manually touch the RadDataBoundListBox control, which pretty much defeats the purpose.
Is there any way to trigger the item realization when manually scrolling a RadDataBoundListBox with ScrollToHorizontalOffset?