Answered by:
wincontrol is not set

Question
-
Hello everybody,
I'm defining a control in default.html like so:
<divid="myRatingControl"data-win-control="WinJS.UI.Rating"data-win-options="{maxRating: 10}" />
Unfortunately, I'm not able to access the wincontrol propetry in default.js
WinJS.UI.processAll().done(function () { var control = document.getElementById("myRatingControl").wincontrol; });
It does not seem to be set at all as code completion offers no according expand option. However, when I'm defining it in default.js itself, wincontrol property is set.
Any ideas what I'm doing wrong? Thanks! --Oliver.Tuesday, March 20, 2012 9:28 AM
Answers
-
Hi,
I think this property should be winControl instead of wincontrol. What happens if you try winControl?
Allen Chen [MSFT]
MSDN Community Support | Feedback to us
Get or Request Code Sample from Microsoft
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
- Marked as answer by Jeff SandersMicrosoft employee, Moderator Wednesday, March 21, 2012 7:11 PM
Wednesday, March 21, 2012 8:09 AM
All replies
-
There is a typo in the html tag. Of course, it is declared as
<div id="myRatingControl"data-win-control="WinJS.UI.Rating"data-win-options="{maxRating: 10}" />
Tuesday, March 20, 2012 9:29 AM -
Solved it. Div tags are required to have an explicit closing tag, i.e. <div></div>
EDIT:
Unfortunately, that was just worked by accident. I still get the same Problem with other examples that are also using
WinJS.UI.RatingAny ideas? What am I missing?
Tuesday, March 20, 2012 10:04 AM -
Hi,
I think this property should be winControl instead of wincontrol. What happens if you try winControl?
Allen Chen [MSFT]
MSDN Community Support | Feedback to us
Get or Request Code Sample from Microsoft
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
- Marked as answer by Jeff SandersMicrosoft employee, Moderator Wednesday, March 21, 2012 7:11 PM
Wednesday, March 21, 2012 8:09 AM