Answered by:
metro app using flipview binding data with FileInformationFactory

-
Hi all,
I have referenced the sample StorageDataSource and GetVirtualizedFilesVector sample and I modified the item control gridview to flipview. The result seems perfect but there is one problem show up when I am sliding photo from previous to next one. The photo always jump back to first photo after sliding few photos. Is there any method to fix this problem? Or is there other method can bind file vector with flipview?
Thursday, September 20, 2012 4:10 AM
Question
Answers
-
Hi,
Then please refer to: http://www.codeproject.com/Articles/415701/Databinding-in-Windows-8-JavaScript-Metro-Style-Ap.
Please mark the replies as answers if they help or unmark if not.
If you have any feedback about my replies, please contact msdnmg@microsoft.com
Microsoft One Code FrameworkFriday, September 21, 2012 3:18 AM
All replies
-
Hi,
Please refer to the code as follow:
<div id="basicFlipView" data-win-control="WinJS.UI.FlipView" data-win-options="{ itemDataSource : DataExample.itemList.dataSource }"> </div>
(function () { "use strict"; var dataArray = [ { type: "item", title: "Cliff", picture: "images/Cliff.jpg" }, { type: "item", title: "Grapes", picture: "images/Grapes.jpg" }, { type: "item", title: "Rainier", picture: "images/Rainier.jpg" }, { type: "item", title: "Sunset", picture: "images/Sunset.jpg" }, { type: "item", title: "Valley", picture: "images/Valley.jpg" } ]; var dataList = new WinJS.Binding.List(dataArray); // Create a namespace to make the data publicly // accessible. var publicMembers = { itemList: dataList }; WinJS.Namespace.define("DataExample", publicMembers); })();
More details, please refer to: http://msdn.microsoft.com/en-us/library/windows/apps/hh465425.aspx .Please mark the replies as answers if they help or unmark if not.
If you have any feedback about my replies, please contact msdnmg@microsoft.com
Microsoft One Code FrameworkThursday, September 20, 2012 9:26 AM -
Hi,
Thanks for replying so fast. But I still have a question about this sample. This example is for picture included in code what if I want to get pictures in folders. for example in picture folder. I have tried many ways but still can't find a better way to bind data on flipview. I have tried fileinformationfactory class but the result are as I mentioned (there is a jump back problem). Is there a better way to bind local picture on flipview (local path such as c:\img\xx.jpg)
Thursday, September 20, 2012 5:09 PM -
Hi,
Then please refer to: http://www.codeproject.com/Articles/415701/Databinding-in-Windows-8-JavaScript-Metro-Style-Ap.
Please mark the replies as answers if they help or unmark if not.
If you have any feedback about my replies, please contact msdnmg@microsoft.com
Microsoft One Code FrameworkFriday, September 21, 2012 3:18 AM