Over a million developers have joined DZone.

WP7 Cascade Behavior

DZone's Guide to

WP7 Cascade Behavior

· Mobile Zone
Free Resource

Download this comprehensive Mobile Testing Reference Guide to help prioritize which mobile devices and OSs to test against, brought to you in partnership with Sauce Labs.

Windows Phone 7 is all about clean layouts and beautiful transitions. Unfortunately, we are left to generate many of these tranitions ourselves as WP7 will not ship with these great effects. The listbox shows of several . I put together a simple trigger action that allows you to apply cascading animations to a listbox. Simply create an animation in in a resource dictionary within your item template and reference it from your trigger action. You can write a custom delay generator as well as set the animation interval. Most importantly the animations respect virtualized lists; click on one of the items in the list to invoke the exit animation, once it has completed scroll down, you will see that items that were not in the view port were not animated, this ensures the best performance. In production you would hide the list or transition to a new page so these list items would never be seen. The code has not been fully tested and there are a few more features that would be nice to have but it is a good launching point. Take a look at ItemsControlExtensions for some great extension methods for virtualized items controls.

Analysts agree that a mix of emulators/simulators and real devices are necessary to optimize your mobile app testing - learn more in this white paper, brought to you in partnership with Sauce Labs.


Published at DZone with permission of Erik Klimczak, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}