The FlipView control is also a collection control, but unlike a control such as a ListView, the ListView control displays multiple items at one time, while FlipView displays only one item at a time. Flip through the items on the Windows Phone with the default left and right swipe, or swipe up or down.
Today, small dreams use Flipview controls and timers to give you the ability to automatically browse the image.
The front code is as follows:
<flipview name= "FlipView" ><flipview.itemtemplate><datatemplate><image Name= "Image" Source= "{ Binding ImageSource} "></Image></DataTemplate></FlipView.ItemTemplate></FlipView>
The background code is as follows:
Public classimage{ Public stringImageSource {Get;Set; }//Picture Path}protected Override voidonnavigatedto (NavigationEventArgs e) {List<Image> list =NewList<image>(); list. ADD (NewImage {imagesource = "iamge/1. jpg "}); List. ADD (NewImage {imagesource = "iamge/2. jpg "}); List. ADD (NewImage {imagesource = "iamge/3. jpg "}); Flipview. ItemsSource= list;//add a photo path as an object source for an Flipview control project image control//Fvstoryboard.begin ();DispatcherTimer _timer =NewDispatcherTimer ();//Define a timer_timer. Interval = Timespan.fromseconds (1.0); _timer. Tick+ = (sender, ET) =//Flipview The index of the currently selected item in the control loop{if(Flipview. SelectedIndex < Flipview. items.count–1) Flipview. SelectedIndex++;ElseFlipview. SelectedIndex=0;}); _timer. Start ();}
Windows Phone 8.1 FlipView automate photo browsing