Design Tips for Quick Navigation Between Views

Typically, when a view requires a lot of bindings or some user interface elements, such as a Bing Map, a “while” is required to load (for example, between half a second and a second).

I do not need a delay between the click action (for example, clicking an item in a ListBox) and the navigation action (displaying a new page).

I do not mind the gradual display of the page. For example, for a Bing card, I do not mind displaying a black page with only a title, but after a second the map appears.

What are the best practices? He can post a sample if I'm not clear enough.

edit: I will keep the question open for a while, so others can answer. Thanks to Matt and Mick for the amazing answers. I am already working on some improvements. The main one is the binding of my controls after the page loads.

+1
source share
2 answers

It was expected that on devices with limited resources non-trivial actions would be performed for at least some time.

The most recommended recommendation for solving this problem is to use animations to give the user an idea of ​​perceived performance. It was a recurring recommendation at all stages of the CTP and Beta product team and presentations in Mix 10 and Tech Ed 2010.

Page transitions are a general approach to this.

Discussed here by Kevin Marshall, before being included in the November toolkit.

WP7 - Example page transitions

And here, referring to the control in the toolbox.

Transitions for Windows Phone 7

There are also a number of very simple optimizations you can do that will give you a little hack for a little effort.

I would also reiterate Matt's suggestion that you do not load controls that are not originally used.

If you decide to go the extra mile , you can do more to optimize page loading. These two posts deserve attention in this regard.

Create High-Performance Silverlight Applications for Windows Phone

WP7 Development Tips Part 1 - Kevin Marshall Epic Work Blog for Awesome People

If you use Listboxes, check out also Oren Nachman and David Anson

WP7 Silverlight Perf Demo 1: VirtualizingStackPanel vs. StackPanel as a ListBox ItemsPanel

Keeping a Low Profile LowProfileImageLoader helps freeze Windows Phone 7 UI thread by loading images in the background

Never do today what you can put off until tomorrow. Help DeferredLoadListBox (and StackPanel). Windows Phone 7 lists scroll smoothly and sequentially

and make sure the image sizes are optimized for their display size.

+2
source

My suggestions / recommendations:

  • Create and go to the new page as quickly as possible.

  • Display a page with placeholder content at load time (if necessary).

  • Indicate that something happens while the page is loading. Uncertain progress indicator (use this ) is a convention on the platform.

  • If you cannot use the page until all controls are loaded, deny access to the page. The translucent object displayed on the entire page is a general technique that allows you to not only not touch the controls, but also indicate that they cannot be touched yet.

  • If possible / practical, set the size of the elements in xaml / code to prevent relaying due to resizing after loading the element.

  • Try delaying the loading of items that were not originally on the screen to reduce the expected total loading time.

and finally:

  • Optimize everything to reduce load times and make the application as flexible as possible.
+1
source

Source: https://habr.com/ru/post/1334852/


All Articles