none
In the flipView. How to get the currentPage? RRS feed

  • 问题

  • In the flipView ,I don't get currentPage, please help me!

    (function () {
        "use strict";

        WinJS.Binding.optimizeBindingReferences = true;

        var app = WinJS.Application;
        var activation = Windows.ApplicationModel.Activation;
      
        app.onactivated = function (args) {
            if (args.detail.kind === activation.ActivationKind.launch) {
                if (args.detail.previousExecutionState !== activation.ApplicationExecutionState.terminated) {
                   
                    WinJS.UI.processAll();
                    var myFlipview = document.getElementById("basicFlipView");
                    myFlipview.addEventListener("pageselected", handler);
                    
                } else {
                   
                }
                args.setPromise(WinJS.UI.processAll());
               
              
            }
        };

        app.oncheckpoint = function (args) {
           
        };
        function handler(eventInfo) {
           var currenPage = basicFlipView.currentPage;
          
        }
        app.start();
    })();

      <div id="basicFlipView"
        data-win-control="WinJS.UI.FlipView"
        data-win-options="{ itemDataSource : DataExample.itemList.dataSource,itemTemplate : ItemTemplate ,currentPage : 2,onpageselected : handler }">
    </div> 

    2013年9月24日 14:39