locked
Adding Page control in VS RRS feed

  • Question

  • HEllo guys.

    Quick question: why does the html page created when you choose the new Page control option from VS still references the WinJS js and css files? I'm under the impression that Page controls will always be used in the context of another page, so adding these by default will only result in extra work for  the dev because he'll probably end up clearing those refs (at least, the CSS refs should be removed by default from the template used to create the HTML page because it will always get loaded, right?).


    Luis Abreu

    Saturday, March 10, 2012 3:03 PM

Answers

  • The CSS entries are there so that you can design individual pages in Blend.  We understand that for users who change to the light style that this will cause an annoyance as you've mentioned since you'll have to either change them to ui-light (to be able to use Blend), or just remove them completely if you don't need design support.

    ~Gearard


    This posting is provided "AS IS" with no warranties, and confers no rights.


    Monday, March 12, 2012 6:39 PM

All replies

  • They are there to give better design-time support when editing those files.  With the WinJS reference you will get full IntelliSense support when using them in your JS files for instance.  It doesn't affect the runtime so we added them to make the design-time experience better (otherwise you'd probably end up directly referencing them anyway via /// <reference tags.

    Also, if you edit the page control in Blend, they require those references for basically the same reason from what I understand.

    Saturday, March 10, 2012 7:29 PM
  • Yes, you're right about the js files. However, that's not the case with css files. For instance, I'm using the light scheme and all the pages that I add to my projet will overide that with the black scheme. it's kind of annoying to have to keep deleting the css entry in all those files...

    Luis Abreu

    Monday, March 12, 2012 1:39 PM
  • The CSS entries are there so that you can design individual pages in Blend.  We understand that for users who change to the light style that this will cause an annoyance as you've mentioned since you'll have to either change them to ui-light (to be able to use Blend), or just remove them completely if you don't need design support.

    ~Gearard


    This posting is provided "AS IS" with no warranties, and confers no rights.


    Monday, March 12, 2012 6:39 PM
  • Hello again Gearard. I'm just hoping that this will change when we get the next release. Ok, I'm not a designer, so I still do it the "hard way" (yes, I do write my HTML, JS and CSS in VS, without any drag-n-drop) and this current behaviour really annoys me ;)

    thanks again.


    Luis Abreu

    Monday, March 12, 2012 9:08 PM