7

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?

Mike
  • 2,220
  • 1
  • 18
  • 32

2 Answers2

9

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

HelpMatters
  • 1,299
  • 1
  • 13
  • 32
  • Funny, for the past few days, it's been showing me the phone designer, and I didn't even realize. Only when I read your answer and went to try it out, I noticed that it was already doing that for me. I guess I must've changed it by accident, so I would've probably noticed in the future, and *maybe* I would've figured it out. It was a lot easier with your help, though. Thanks! – Mike Jun 24 '14 at 17:29
2

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.