Windows phone 7 pictures transition applications, how to make your own?

The standard Windows Phone 7 application with regular images has a very good click on the images (select a specific image and then click). Think about how to replicate this in my own application.

: a) go to the previous / next image using a click b) when you click, the visual feedback is visible (transitions between the current and next / previous images) c) the number of shots is unknown at the time of execution (only previous / current / next images are in any moment, others are loaded if necessary).

If there is no specific sample on the Internet, at least what controls should be used to implement it?

+4
source share
3 answers

It seems that LoopingSelector is quite appropriate for the task. I used the Silverlight tool files for Windows Phone and used them to create a horizontal version of LoopingSelector. In fact, this is more of a hack than a real implementation, so I don’t post it (if you are interested, I searched / replaced the horizontal verticals in the processing of user actions, turned the control 90 degrees and adjusted the physical values).

0
source
0
source

The way I did this was to use a ListBox, replace the Panel Element style with a StackPanel with = horizontal orientation. Thus, you get the opportunity to move around and move around for free!

Then the trick will make the list load your images dynamically and work well. See http://codifying.wordpress.com/2011/01/23/wp7-everything-about-listbox-performance/ this blog post for a discussion of how to make lists better. I would recommend Lazy List Box or LongListSelector.

If you need to create a class that implements IEnumerable and use "yield return" to load the next / previous image when necessary.

0
source

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


All Articles