title: when can i set WinJS.UI. setoptions?
body: <p>I have one custom control . I want to set the options in script side before the control rendered how can i pass the options ?</p>
  
  
  
  
  <p>i want to pass the options through script in the same html page.</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
  
          $(document).ready(function () 
  {
  
              var myDiv = document.getElementById("svgChart").winControl;
  
  
  
  
  
              WinJS.UI.setOptions(myDiv, {
                  seriesList: [{
                      label: "s1",
                      legendEntry: true,
                      data: { x: [1, 2, 3, 4, 5], y: [-5, -3, 1, 7, 2] }
                  }, {
                      label: "s2",
                      legendEntry: true,
                      data: { x: [1, 2, 3, 4, 5], y: [-2, -6, 2, 4, 3] }
                  }, {
                      label: "s3",
                      legendEntry: true,
                      data: { x: [1, 2, 3, 4, 5], y: [-3, -5, 3, 2, 5] }
                  }]
              });
          });
  
      &lt;/script&gt;
  </code></pre>
  
  <p>but wincontrol returns undefined element ? when  can i set the options  before the control created ?</p>