Is it possible to apply UI virtualization to ScrollViewer in WinRT. In my application I am creating a line chart with the help of Polyline(Polyline embedded inside a scrollviewver). But in the current case, If it come more than 500 points. It blocks the UI during the time of interacting with the Map. So what I am trying to achieve is to apply kind of UI virtualization to scroll view. If anyone had any idea to solve this please help me.
The way I would handle a Polyline
is I would break its data into sections, perhaps screen-wide ones (assuming horizontal-only scrolling), put a Canvas
inside of the ScrollViewer
, make the size (Width
) of the Canvas
the total size of the chart and put a few (say 5) Polyline
controls in it and then on the ViewChanged
event update the Polyline
controls' Canvas.Left
and Points
properties to correspond to the area around the current view port of the ScrollViewer
. That should give you smooth scrolling. Just don't add/remove or update the controls on each ViewChanged
and only update Canvas.Left
and Points
when you need to - that is when you don't have a Polyline
ready to display next to the current view port.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With