XAML Designer not showing up

后端 未结 23 1145
闹比i
闹比i 2020-12-15 02:31

In MS Visual Studio Express 2013 for Windows Desktop:

I\'m learning C# and following an example that shows how to create a user interface in a .xaml file. https://ms

相关标签:
23条回答
  • 2020-12-15 03:20

    FYI: This is a brute force method. I posted a much cleaner solution to my problem in a different answer.

    Problem: XAML UI Designer not showing while using a git repository

    Solution: Delete and recreate the project directory in %USERPROFILE%\source\Repos.


    Steps:

    1. Delete the project directory from %USERPROFILE%\source\Repos using File Explorer
    2. Choose Checkout from Visual Studio Team Services on the Start Page
    3. Pull the project again

      Warning: make sure your files are backed up!


    Version: Visual Studio 2017

    Type of project: C# and WPF targetting .Net 4.5.2 with Console Application as the Output Type (for trouble-shooting purposes I've got it both as a WPF and a Console Application).

    Problem Details:

    I pulled a project I was working on from a git repository onto the problem computer (using all of Microsoft's in-built software and accounts). It was cloned successfully onto the problem computer and Visual Studio worked. After a pull from the repo the XAML UI Designer (Blend?) disappeared leaving me with only the XAML source. The solution (after trying some of the others listed here) was to delete the source directory from my local computer and pull a fresh clone of the project.

    Hint:

    Deleting and re-creating the project may work for other cases as well. YMMV.

    0 讨论(0)
  • 2020-12-15 03:21

    I am not sure if I should post the answer here because it may not apply for VS Express 2013.

    I have exactly the same problem using Visual Studio 2015 Community Edition. It turns out my project Target version is higher.

    Try the following:

    • Right click on your project in solution explorer.
    • Change the Target version to Windows 10 (10.0; Build 10240).

    Let me know if it is not relevant and I will delete my answer.

    Cheers, Sam

    0 讨论(0)
  • 2020-12-15 03:22

    Problem: XAML UI Designer not showing

    Solutions: (different from and much more elegant than my earlier solution)

    1. Click on the Solution file (.sln) in the Solution Explorer, if the .sln file is listed in the Solution Explorer
    2. Click on the Expand Pane icon to display the Design pane, if it's shown

    Solution 1: Open the .sln file:

    My project is cloned from a git repository. When I open it from the Start Page it opens up with a whole list of files in the Solution Explorer. If I open any of the .xaml files from that Solution Explorer they open with a XML editor which doesn't show the graphical XAML view.

    At the very bottom of the Solution Explorer is a .sln (solution) file. Opening that file then loads the file list I'm used to. If any .xaml files are open they will not have access to the Design view. Opening them and closing them at this point will load the Design view. If the Design view still doesn't appear see Solution 2 immediately below.


    Solution 2: Click on Expand Pane:

    At the bottom of the XAML editor window you may see a small icon with a double arrow (Expand Pane). If you do, it means that you've hidden the Design Pane. Click it and you should get the Design Pane back.


    Version: Visual Studio 2017

    Type of project: C# and WPF targetting .Net 4.5.2 with Console Application as the Output Type (for trouble-shooting purposes I've got it both as a WPF and a Console Application).

    Problem Details:

    I pulled a project I was working on from a git repository onto the problem computer (using all of Microsoft's in-built software and accounts). It was cloned successfully onto the problem computer and Visual Studio worked. After a pull from the repo the XAML UI Designer (Blend?) disappeared leaving me with only the XAML source.

    An earlier solution I came across was to delete the source directory from my local computer and pull a fresh clone of the project. That fixed my problem, however, now I've played with it and found two other reasons my XAML Design View was missing. I imagine that I didn't need to delete the folder and that these two solutions would've been sufficient.

    0 讨论(0)
  • 2020-12-15 03:22

    I had same issue - until I realized these buttons here.. see screenshot.

    0 讨论(0)
  • 2020-12-15 03:23

    I ran through every solution in this post - apparently what I'd been missing is that I'd totally forgotten what the designer tab looked like.

    When opening the XAML file, it always defaulted to code view no matter what (even after Repair), but sure enough, there was a small icon in the top right of the XAML code view that switched it to Design view.

    sigh

    0 讨论(0)
提交回复
热议问题