December 2013
Intermediate to advanced
480 pages
14h 11m
English
When a control gets created, it is always associated with a DOM element. The DOM element is the “host” for the control.
You can retrieve a control from its associated DOM element by using the winControl property. Every DOM element that has an associated control has a winControl property that represents the control.
For example, if you declare a DatePicker control like this:
<div id="dateBirthday" data-win-control="WinJS.UI.DatePicker"></div>
Then you can retrieve the DatePicker control in your JavaScript code like this:
(function () { "use strict"; function initialize() { WinJS.UI.processAll().done(function () { var ...
Read now
Unlock full access