Why is a project created in VS2012 not editable in Blend4 + SketchFlow - wpf

I created a project/solution in VS 2012. I open the same solution in Blend but it doesn't allow me to edit it in the designer - I only can edit the XAML directly.
I'm lost. What's going on?
EDIT: I read somewhere that Blend requires "Any CPU" - I verified that this is set.
EDIT2: It works with .NET4.0. Does this mean that .NET4.5 is not supported?

Yes. It needs the blend for vs2012 preview in order to edit it, however .xaml and .xaml.cs files don't really have any difference between .net4 and .net45, so there isn't anything to stop you creating a solution in vs2010 and including the same files, so that you can use blend to edit it.

Related

Expression Blend integration with source control?

I have a WPF project in Visual Studio 2012. It have it all set up with source control, so that if I try to edit a file that I don't have checked, it will automatically try to check it out, and then allow me to edit it.
Is this supposed to work in Expression Blend 2012 as well?
If I open the same project in Expression Blend, it lets me edit a non-checked-out file, and I may not even realize that I don't have the file checked out until I try and save it, and it tells me that the file is read-only.
Is there something that I have to do to enable source control in Blend? Or, does Blend not even support source control integration?
It sounds more like a setting issue. In Visual Studio, there is an 'Allow checked-in item to be edited' option at Tools->Options->Source Control->Environment. Please make sure you uncheck it.
Blend supports source control integration. This blog article might help.

Visual Studio 2010 - XAML Editor Extraordinarily Slow

Has anyone else experience incredibly slow performance in the XAML editor in VS 2010? If I have a new project with a limited number of files, the performance is fine. However, if I have a project with a larger number of XAML files, the XAML editor hangs intermittently every few seconds, making it almost impossible to use.
I should also note that the performance is only slow in one particular project where I am referencing DevExpress 2010. I am not certain if this is related.
Any suggestions on solutions to this problem would be greatly appreciated.
Chris
In Visual Studio 2012:
Go to
Tools > Options > TextEditor > XAML > Misc
Check Always open documents in XAML view and uncheck Automatically populate toolbox items.
In Visual Studio 2015, 2017:
Go to
Tools > Options > XAML Designer
uncheck Automatically populate toolbox items.
This fixed my same problem.
If you don't need the visual designer, you can select a different editor in visual studio:
Right click the xaml file -> Open With... -> Source Code (Text) Editor
You will only lose the split view, intellisense etc. should still work.
If you need to check something in the designer you can still click 'view designer' to open the normal XAML editor again.
If you want to improve the performance of the visual designer, try checking DesignerProperties.GetIsInDesignMode in your code-behind. The visualiser instantiates your controls to know how to display them, thus executing parts of the code-behind.
Like the OP, I had extreme lag in the xaml editor on a project that relied heavily on DevExpress WPF controls. After trying unsuccessfully to resolve this issue with the other solutions posted here, I eventually tried deleting my Solution User Options (.suo) file, which is usually located in the same folder as the solution (.sln) file. This immediately resolved the issue. You may want to read this post about what visual studio stores in the suo file so you can reset anything important (such as build configuration - mine always defaults the active solution platform back to "Mixed Platforms" for example)
Short answer: if you do not use designer much, just replace the default editor for XAML, thus getting rid of XAML visual designer and speeding things up. Right click any XAML file, click Open with... and choose another default editor. Source code (text) editor works just fine.
Now it should be already fine. If you want to understand the details and completely get rid of the slow designer, read the long answer.
Long answer: Here is a nice explanation of what happens and why is it that slow.
A brief todo based on the aforementioned article in order to completely disable the visual designer of XAML:
Under Tools->Options->Text Editor->XAML->Miscellaneous->Default View check Always open documents in full XAML view
Open Task manager and end XAML Designer process XDesProc.exe (Note: for VS2013 right click this process and go to containing folder. Rename the exe to sth else, than end the process)
Standard XAML editor will load this process again (I guess it will not succeed with VS2013 and actions done in P.2). However, right click any XAML file, Open with... and choose another default editor. Source code (text) editor works just fine.
While using dev express, I've noticed some laggy response in the Visual Studio designer. This appears to be due to the license authentication of the DevExpress products.
If you delete the "Licenses.Licx" file (found in the project properties folder) you'll notice a marked improvement in performance.
Note: Removing the license file doesn't stop you from using DevExpress controls. But it does stop VS from constantly authenticating it.

WPF Application template is missing

My VS2010 install has WPF Browser application project template, and WPF User Control lib template, but no WPF Application template. Any suggestions would be appreciated.
For me I was missing ProjectTypeGuids in the .csproj file (a new project worked for me so just compared the project files), so if you add this to the .csproj file under PropertyGroup I then had all the WPF types available for adding:
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
This is kind of an old question, but I just hit the same issue and found the answer after the above didn't help, so....the solution for me was that I had to select a higher framework version (4.0) before the WPF Application template I was looking for became visible. If you find that you don't have the WPF or other project templates you expect available, you may want to check that you've selected the approriate framework version from the drop-down list immediately to the right of the "Recent Templates" label in the Add New Project dialog (it's near the top-left of the dialog in question).
This issue is a lot older than Visual Studio 2010. It goes back to 2005 at least. Lucky you, I was missing the New Class template once.
According to a bunch of sources, this trick works:
If you are missing a template that comes with your installation, run devenv.exe with the /installvstemplates switch.
You'll need to exit out of all Visual Studio instances for this to work.
The trick is mentioned in the MSDN documentation:
http://msdn.microsoft.com/en-us/library/0fyc0azh.aspx
Thread on the issue in a previous version of Visual Studio: http://social.msdn.microsoft.com/forums/en-US/vssetup/thread/8a5ae9e3-be7b-493d-831c-1e49e8103f26/
I wound up uninstalling and reinstalling my Visual Studio entirely but this trick probably would have fixed my problem.
Just had this in VS2017 Community Edition. This discreet message to add missing templates helped me:
In VS 2017
Make sure that you have .Net Desktop Tools checked in you VS
https://developercommunity.visualstudio.com/content/problem/44429/missing-wpf.html
For .NET 5 (or newer) is needed to have in .csproj in xml path Project/PropertyGroup:
<UseWPF>true</UseWPF>

Reset VS2010 Project Templates?

I installed Blend 4 RC recently but strangely it deleted some of my VS2010 projects templates, including the most important ones being Silverlight User Control and Silverlight Application.
Does anybody know how to get back these templates or tell VS2010 to reset all templates?
A bit frustrating, I'm having to create projects on my laptop then copy them to my desktop manually :(
No matter, I just reinstalled SL4 Tools and I've got my templates back once more.
Blend 4 RC also confused VS2010 on my machine, causing the WPF UserControl template to disappear. I don't use the SL4 Tools, so solved the problem on my machine by placing the template from Program Files\Microsoft Visual Studio 10.0\Common7\IDE\ItemTemplates\CSharp\WPF\1033 in My Documents\Visual Studio 2010\Templates\ItemTemplates\Visual C#\WPF.
A better solution is also described here.

Why isn't Expression Blend rendering my User Control? It's only showing XAML

I'm opening valid XAML within my VS2008 solution in Expression Blend 3 and it is only showing XAML when I try to open individual XAML files. My solution/projects all build and run correctly.
When I go to View -> Active Document View the Design View, Split View and XAML View options are all grayed out... which doesn't make much sense.
I'm not much of a Blend user, but this has never happened before, and I'm coming up blank for how to fix it. Any ideas?
How did you create your project ? Did you use the "Class library" templates in Visual Studio ?
I remember I had a similar problem. You can create a new WPF project and compare the CSPROJ with the one not working in Blend. You should be able to see the differences and add the missing lines in your CSPROJ.
HTH
For me, the problem was solved by changing the target framework of the project - I was using 4.5, but Blend could support max version 4.0 - try that...
open the project file in notepad and add the following line within the <PropertyGroup>
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
Found the solution here -> link text

Resources