在JavaScript中创建一个`data-win-control`

时间:2013-01-25 16:17:20

标签: javascript winjs

是否可以在JavaScript中实例化一个data-win-control对象,而不必将其放到DOM上并调用WinJS.UI.processAll()

1 个答案:

答案 0 :(得分:2)

是的,可以在后面的代码中执行:

// Object is a new FlipView component instantiate in code behind
// element can be an element already existing in the DOM or just created with JS
var object = new WinJS.UI.FlipView(element, options);