locked
How to get screen width and height? RRS feed

  • Question

  • How to get screen width and height in metro app?
    Wednesday, December 14, 2011 9:00 AM

Answers

  • Do you really want the screen width and height or do you want the size of your window?  That will often be the same, but not when snapped or filled.  You can get this by looking at your main page's ActualHeight and ActualWidth.

    --Rob

    • Marked as answer by Jie Bao Tuesday, December 27, 2011 7:35 AM
    Friday, December 16, 2011 12:40 AM
    Moderator

All replies

  • Do you really want the screen width and height or do you want the size of your window?  That will often be the same, but not when snapped or filled.  You can get this by looking at your main page's ActualHeight and ActualWidth.

    --Rob

    • Marked as answer by Jie Bao Tuesday, December 27, 2011 7:35 AM
    Friday, December 16, 2011 12:40 AM
    Moderator
  • I have similar issue, but I am basically looking for window's resolution. I want to change the center and top of an image by the factor of 1/10 of the screen resolution at every key press. Can you help me figure out which is the best way to do it?
    Sunday, October 14, 2012 7:31 AM