VS XAML设计错误 [英] VS Xaml designer error

查看:434
本文介绍了VS XAML设计错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个错误在一个WPF应用程序我的XAML文件。我无法看到在Visual Studio设计或混合我的控制。但是,该应用程序编译,并且进行了运行。

I have an error with my Xaml files in a WPF application. I'm not able to see my control in the Visual Studio designer or in Blend. But, the application compiles and is running perfectly.

在Blend中,它说,有一个无效的XA​​ML和错误只是让没有SENS可言,但是当我关闭控制有没有更多的错误。

In Blend, it says that there's an invalid Xaml and the error just make no sens at all, but when I close the control there's no more error.

在Visual Studio中,错误的是更加明确。

In Visual Studio, the error is more explicit.

Error   27	Invalid XmlnsDeclaration occurs in assembly 'Microsoft.Expression.Interactivity, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. XmlnsDeclaration references a namespace 'Microsoft.Expression.Interactivity.Layout' that is not in the assembly.

我做我的研究对这个错误,我发现了一些有趣的事情。

I made my research on this error and I found some things interesting.

解决方法1

与命名空间创建一个虚拟类的 Microsoft.Ex pression.Interactivity.Layout 的。

Create a dummy class with the namespace Microsoft.Expression.Interactivity.Layout.

结果?没有工作。

解决方案2 使用...

相反

xmlns:i="http://schemas.microsoft.com/expression/2009/interactivity"

......加我引用。

... to add my reference.

结果?我已经在做这样的看法。

Result ? I was already doing it this way.

只试过在Blend和仍然没有工作的参考架构URL。

Tried the reference to the schemas url only in Blend and still not working.

错误:

"The specified value cannot be assigned to the collection. The following type was expected : "TriggerAction".

通过这个code:

<interactivity:Interaction.Triggers><interactivity:EventTrigger  EventName="SelectionChanged" ><my:CommandAction Command="{Binding BreedingListSelectionChanged}" SyncOwnerIsEnabled="True" /></interactivity:EventTrigger></interactivity:Interaction.Triggers



最后,我发现这篇文章通过从微软唯一的社区家伙支持。 他说,这一点,一个已知的问题,它可能会解决下一个版本。

Finally, I found this post by a guy from the Microsoft Only Community Support. He's saying that this it an known issue and it will probably be fix next release.

事实上,我需要它现在。

The fact is, I need it right now.

任何人都面临过这样的问题吗?

Anyone faced this problem ?

感谢。

推荐答案

我提起的关于这个具体问题上的错误连接

简短的答案是,这会不会对VS 2008纠正,但它的工作在2010年VS我已经找到了最好的解决方案是使用混合的UI设计(使用前pression / 2009 /互动语法),并设置Visual Studio中(而不是使用设计器)来编辑XAML为XML。这工作很适合我。

The short answer is that this will not be corrected for VS 2008, but it does work in VS 2010. The best solution I've found is to use Blend for UI design (using the expression/2009/interactivity syntax) and set Visual Studio to edit XAML as XML (not using the designer). This has worked quite well for me.

这篇关于VS XAML设计错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆