How to hold up drawing of a UI element until rest of the page has loaded?

孤街浪徒 提交于 2019-12-12 01:42:17

问题


ListView is making the startup time of my app very long. First I see nothing and then the whole page with all of it's contents is drawn at once. How can I make the page draw up without the ListView (or an indeterminate progress ring at it's place) and only after that start drawing the ListView? Also the app need to be able to respond to a backey press during loading. Changing ListView.Visibility to collapsed at XAML and the to Visible on Page_Loaded does not have the desired effect; Only if I leave the ListView collapsed then do I get a fast pageload.

PS: I think virtualization is not the issue here: As 17 items of the list are visible at any time; The list is virtualized but it does load 52 items of the total 68 on startup; But then again the list is not that long.

来源:https://stackoverflow.com/questions/24455514/how-to-hold-up-drawing-of-a-ui-element-until-rest-of-the-page-has-loaded

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!