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://msdn.microsoft.com/en-us/library/jj153219.aspx
It appears from the tutorial (see Figures 7 & 8) that there should be some windows showing the GUI. However, when I try to open the.xaml file in the Solution Explorer, View Code (Ctrl + Alt + 0) and View Designer (Shift + F7) both present the same thing: just the code. How do I open up the GUI box?
Update -- Here are the.xaml file contents. Note: I'm trying to open a new C# WPF Application. This is the stock code that Visual studio produces.
<Window x:Class="WpfEvents.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="MainWindow" Height="350" Width="525">
<Grid>
</Grid>
</Window>
No XAML UI Designer option:
No Full XAML View Setting: Thanks!
This is the version of Visual Studio that I downloaded. The description leads me to believe that the XAML UI Designer should be installed and that this shouldn't be an issue.
Express 2013 for Windows Desktop
Visual Studio Express for Windows Desktop lets you take full advantage of Windows with XAML designers, a productive IDE, and a variety of programming languages including C#, Visual Basic, and C++. Choose between Windows Presentation Foundation (WPF), Windows Forms, and Win32, to target the Windows desktop with the right technology for your application and your skills.
XML designer can be disabled by Resharper in Resharper > Options > Performance Guide
I fixed my problem by turning off Resharper block, and restoring XML designer in Tools > Options
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:
Let me know if it is not relevant and I will delete my answer.
Cheers, Sam
In VS2017 v15.8.9 I found the designer wasn't displaying eg when right clicking in a xaml view's code pane and selecting View Designer.
Performing the following resolved it for me: I went into Tools > Options > XAML Designer and the Enable XAML Designer option was ticked. So, I unticked it, clicked Ok on the Options dialog to close it.
I exited and restarted Visual Studio and again went into Tools > Options > XAML Designer, ticked the Enable XAML Designer, clicked Ok, restarted Visual Studio, and it's now working.
Problem : XAML UI Designer not showing
Solutions : (different from and much more elegant than my earlier solution)
.sln
) in the Solution Explorer , if the .sln
file is listed in the Solution Explorer 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.
Most probably its set not to open the XAML in full XAML view. Try this
If you don't see Text Editor in the Options menu, check the box Show all Settings in the bottom left of the Options window.
For some reason it used "(XML) Text Editor" as the default editor for XAML, to fix this you should right-click your file in the solution explorer then select "Open with.." and select "XAML UI Designer"
Confirming Sam's answer for VS 2015; VS seems to have a reproducible feature: 1. Create a new solution (Windows Universal, say) 2. Create a new XAML view page in that solution 3. If Designer won't load on that page, do what Sam says: Right click on your project in solution explorer and Change the Target version to Windows 10 (10.0; Build 10240). I had the same issue on a project, created a new test solution to explore the issue, and had the same problem. Sam's fix worked.
I have no idea what the issue was, but uninstalling and re-installing the same software did the trick.
Interesting
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 :
%USERPROFILE%\\source\\Repos
using File Explorer 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.
截至目前,尚未为针对.NET Core 3的项目创建设计器。
I had this issue and was able to fix it by uninstalling visual studio AND deleting the Visual Studio folder in my Program Files. Apparently after uninstalling there are still some remaining folders.
My case might have been a bit special though. I have a small C drive and visual studio was always installing files there no mater what I did to change the install dir, so I created a symlink to force it to install to a different directory. That worked, but much later I had to reinstall VS and the symlink was causing an installation error, which prevented some components from installing. So yeah hope this helps
The XAML Previewer has been deprecated in Visual Studio 2019 version 16.8 and Visual Studio for Mac version 8.8, and replaced by the XAML Hot Reload feature in Visual Studio 2019 version 16.9 and Visual Studio for Mac version 8.9. You can use xaml hot reload instead.
I had the same problem for a different reason. I had excluded-from-project the XAML file. When I clicked to edit it there was just the XAML code, no picture. It took a while to spot.
1. Kill the designer process with PowerShell or via Task Manager.
PS C:\Users\nagel> ps XD*
Handles NPM(K) PM(K) WS(K) CPU(s) Id SI ProcessName
------- ------ ----- ----- ------ -- -- -----------
865 54 86464 117936 3.28 7156 1 XDesProc
PS C:\Users\nagel> kill 7156
2. build the project.
The designer windows will appear with the black background and the three links.
Click on the second link that says "Click here to disable running project code and reload the designer".
After the click, the designer window will show up.
I know this is an old topic but my solution might help someone in the future.
I ran into the same problem with Visual Studio 2015 Community on Windows 7, where one of my xamarin android project's xaml files stopped showing the Designer tab below the XAML code, the other day.
I tried all the given solutions with no effect however, following in the footsteps of @Waqas , i found out that "Use quadrant based layout" was unchecked while other checkboxes were ticked. To summarize:
VS 2015 community>Tools>Option>XAML Designer> check Use quadrant based layout
I then quit and restarted Visual Studio to find out the Designer tab to be there at the bottom left of the XAML code, alongside the Source tab. HTH.
就像Xamarin Designer的许多其他问题一样,对我有所帮助的是,关闭所有标签页,清除解决方案,删除bin
和obj
文件夹,重建解决方案
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
i also encountered same issue on Visual Studio 2019. i solve the problem with switching view.
you can switch the view with Switch Views button next to home button in Solution Explorer. you should choose .sln section.
Well this is an old post but I just found another way the designer can hide even when it is configured correctly in VS2019. So here is what happened to me:
XML designer was enabled and all should have worked except the designer was not showing....except it was, just hidden away in a split view slider that had zero width! I can only presume this was because I change monitors a lot on my PC and have resizing of windows going on quite often between monitors of different resolutions.
At any rate search around in the dark on dark nothing around the xml view, grab the split view slider and slide and the designer will show up in no-zero size in the real world....
There is a hidden folder ".vs"
in the same folder where the solution file is.
Deleting this ".vs"
folder might help.
Visual Studio will automatically re-generate this file the next time the solution is opened.
This is my situation but might not apply to yours: I had the same issue but the fix is simple. Somehow my program is still running even I closed my WPF window. I have to stop debugging and then the designer page will automatically show up for me. Hope this works.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.