c# - UWP performance issue in remote desktop when using ListView. But this issue does not happen when using ScrollViewer - Stack

On remote desktop, the following code causes the list items to appear grey for a few seconds while scro

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
Add a comment  | 

1 Answer 1

Reset to default 0

As 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条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信