updated resizing code to support rotation and snapping of app on winrt