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.
[ProjectName]\AssemblyName
, instead ofC:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\AssemblyName
(they have ! sign in yellow triangle.) After I changed them, its all works fine. – Hanan