I am building an application in VS2010 using wpfToolkit 3.5 as a reference assembly.
I tried to add some VisualStates from ExpressionBlend 4, and I get the following error when I try to build a project.
The type "System.Windows.VisualState" exists in both files c: \ Program Files (X86) \ Assembly Link \ Microsoft \ Framework.NETFramework \ v4.0 \ PresentationFramework.dll and 'c: \ Program Files (x86) \ WPF Toolkit \ v3.5.50211.1 \ WPFToolkit.dll '
this is code
<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 this too, but the same error occurred
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>
Any suggestions?
thanks
source share