In Windows 8 when the view state changes from snapped to filled to full screen;
How can I catch these events and respond to them with WinJs ?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
See this blog post on how to catch view state changes. Basically the recommendation boils down to catching the resize event and then checking the view state like this:
If you look in the Microsoft Visual Studio Express 2012 RC for Windows 8 template for Javascript you will see something like this in navigator.js:
According to this msdn page you can also use media queries when view state changes affect the CSS properties or layout specified in the CSS. For all other changes onResize should be used.