问题
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?
回答1:
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
回答2:
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...
回答3:
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
来源:https://stackoverflow.com/questions/1622647/why-isnt-expression-blend-rendering-my-user-control-its-only-showing-xaml