I'm create my WPF project in VS 2010. After I finished my work with functional GUI, I wanted to edit template of my controls in Blend 4. But when I open project in Blend, in DesignMode, he tell me
Invalid XAML
In Result window he wrote:
[ControlName] is not supported in a Windows Presentation Foundation (WPF) project
Where [ControlName] is list of default controls, which I have used in my project (such as Window, DockPanel, etc.)
What to do to avoid this issues and be able to edit WPF forms at DesignMode of Expression-Blend4?
EDIT:
Possible workaround.
After some comparasion of empty projects (*.csproj file), which was created by Blend
and by Studio
, I have find out that VisualStudio
create it with next line:
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
...
while Blend uses the following lines:
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
So, if you change x86
to AnyCPU
, Blend will open project as expected.
I have only seen this error message once before. After comparing a new solution file with the one that wouldn't load I discovered that Blend requires the AnyCPU
platform/configuration to be defined.
If that does not work, ensure that you have all the required assemblies referenced for a WPF project: PresentationCore
, PresentationFramework
, and WindowsBase
.
HTH,
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With