Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Switching between Phone/Windows XAML editor preview in VS2013?

I have a universal app for Windows and Phone in VS2013, and I have a page in the shared project of the solution.

  • When creating pages in the Windows project, the XAML preview window shows a tablet.
  • When creating pages in the Phone project, the XAML preview window shows a phone.
  • When creating pages in the shared project, the XAML preview window shows a... tablet.

As I try to put more pages in the shared project, I'd like to have a quick way to sanity-check my UI on both form factors without having to actually run the project. Sadly, there is no option in the Device panel to switch between preview devices.

How can I preview the XAML of a shared project page in the phone without actually running the project?

like image 326
Mike Avatar asked Jun 06 '14 21:06

Mike


2 Answers

You don't need to run the project.

There is an easy way to switch between the different design views using the dropdown that is present above the xaml code of the shared project as shown below.

Step 1: Locate the dropdown

enter image description here

Step 2: Click on the dropdown arrow

enter image description here

Step 3: Change the Project to .WindowsPhone

enter image description here

Step 4: Change it back whenever required.

Hope it helps

like image 114
HelpMatters Avatar answered Sep 22 '22 19:09

HelpMatters


In your XAML View. Above the XAML code in the top tool bar you can find a dropdown that will let you switch between YourApp.Windows and YourApp.WindowsPhone. This way you can easily switch views.

Hope it helps.

like image 23
Shrivardhan Avatar answered Sep 24 '22 19:09

Shrivardhan