On remote desktop, the following code causes the list items to appear grey for a few seconds while scrolling.
<ListView Margin="10" ItemsSource="{Binding Items}" ></ListView>
But for this code, scrolling works fine
<ScrollViewer VerticalScrollMode="Enabled" VerticalScrollBarVisibility="Visible" >
<ItemsControl ItemsSource="{Binding Items}" > </ItemsControl>
</ScrollViewer>
In both cases, the Items are a collection of strings. This issue does not happen when its on local machine.
I tried to configure windows remote desktop group policy setting, but didn't have any effects. What changes need to be done to make scrolling smooth in remote desktop?
On remote desktop, the following code causes the list items to appear grey for a few seconds while scrolling.
<ListView Margin="10" ItemsSource="{Binding Items}" ></ListView>
But for this code, scrolling works fine
<ScrollViewer VerticalScrollMode="Enabled" VerticalScrollBarVisibility="Visible" >
<ItemsControl ItemsSource="{Binding Items}" > </ItemsControl>
</ScrollViewer>
In both cases, the Items are a collection of strings. This issue does not happen when its on local machine.
I tried to configure windows remote desktop group policy setting, but didn't have any effects. What changes need to be done to make scrolling smooth in remote desktop?
Share Improve this question asked Mar 25 at 20:38 xingquexingque 12 bronze badges 1- The ListView is "heavier" and requires a higher frame rate for smoothness. "Virtualization" also comes into play (or the lack of it). The ScrollViewer doesn't do much work in terms of "scrolling content" (like a web browser). – Gerry Schmitz Commented Mar 26 at 0:03
1 Answer
Reset to default 0As Gerry said in the comments, The ScrollViewer
doesn't do much work in terms of "scrolling content" (like a web browser). ScrollViewer
allows child elements unlimited space with auto-sized rows or columns. When a virtualized ItemsControl
is placed in ScrollViewer
, it takes enough room to display all of its items, which defeats UI virtualization.
ListView
perform UI virtualization for you. The reason why you see grey behavior on the remote desktop may be that the hardware performance of the remote desktop is not enough. If you don't have many elements, you can use ScrollViewer
. If the number is large, you can consider data virtualization, which display a limited number of elements each time in ListView
.
ListView and GridView UI optimization
ListView and GridView data virtualization
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744169608a4561471.html
评论列表(0条)