本文介绍了wpf VisualState与wpfToolkit冲突?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用wpfToolkit 3.5作为参考程序集在VS2010中构建应用程序.
I am building an application in VS2010 with wpfToolkit 3.5 as referenced assembly.
我试图从ExpressionBlend 4中添加一些VisualState,但是在尝试构建项目时出现以下错误.
I tried to add some VisualStates from ExpressionBlend 4 and I am getting the following error when I am trying to build the project.
这是代码
<VisualStateManager.VisualStateGroups>
<VisualStateGroup x:Name="ShowHideRoomNumber">
<VisualState x:Name="Show"/>
<VisualState x:Name="Hide">
<Storyboard>
<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="comboBox">
<DiscreteObjectKeyFrame KeyTime="0" Value="{x:Static Visibility.Hidden}"/>
</ObjectAnimationUsingKeyFrames>
</Storyboard>
</VisualState>
</VisualStateGroup>
</VisualStateManager.VisualStateGroups>
我也尝试过,但是发生了相同的错误
I tried also and this but the same error occured
xmlns:vsm="clr-namespace:System.Windows;assembly=WPFToolkit"
<vsm:VisualStateManager.VisualStateGroups>
<vsm:VisualStateGroup x:Name="ShowHideRoomNumber">
<vsm:VisualState x:Name="Show"/>
<vsm:VisualState x:Name="Hide">
<Storyboard>
<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="comboBox">
<DiscreteObjectKeyFrame KeyTime="0" Value="{x:Static Visibility.Hidden}"/>
</ObjectAnimationUsingKeyFrames>
</Storyboard>
</vsm:VisualState>
</vsm:VisualStateGroup>
</vsm:VisualStateManager.VisualStateGroups>
有什么建议吗?
谢谢
推荐答案
这是 extern别名的用途 http://msdn.microsoft.com/en-us/library/ms173212.aspx
您可以通过
- 右键单击WPFToolkit参考以查看其属性,
- 将别名"字段更改为您喜欢的任何内容.
这篇关于wpf VisualState与wpfToolkit冲突?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!