Question

I'm using VS2008 EE SP1 + WPF + XAML. In the beginning I added a reference to it:

xmlns:vsm="clr-namespace:System.Windows;assembly=System.Windows"

I'm getting this error while compilation:

<vsm:VisualStateManager.VisualStateGroups>  
   <vsm:VisualStateGroup x:Name="CommonStates">
                        <vsm:VisualStateGroup.Transitions>
                            <vsm:VisualTransition To="MouseOver" Duration="0:0:0.1"/>
                            <vsm:VisualTransition To="Pressed" Duration="0:0:0.1"/>
                        </vsm:VisualStateGroup.Transitions>
                        <vsm:VisualState x:Name="Normal"/>
                        <vsm:VisualState x:Name="MouseOver">
                            <Storyboard>
                                <DoubleAnimation Duration="0:0:0.1" Storyboard.TargetName="Highlight" Storyboard.TargetProperty="Opacity" To="1"/>
                            </Storyboard>

Does anybody know the reason and possible workaround?

Was it helpful?

Solution

This will not work in a .NET 3.5sp1 WPF application.

VisualStateManager and the related classes were introduced as part of Silverlight 3. It is not part of WPF in 3.5sp1, but is being added to WPF in Version 4.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top