Author: davidpni | Posted on: 6/10/2008 9:12:27 AM | Views : 1040

I created a button with a custom template in Blend, and I did some work with the Visual State Manager as well.
Now, when I port the button into Visual Studio, it does not compile.  I inserted the following line into my code:
 
xmlns:vsm="clr-namespace:System.Windows;assembly=System.Windows"   
 
And that elminated many errors, but I still get this error:
 
Error    1    The attachable property 'VisualStateGroups' was not found in type 'VisualStateManager'.
 
 Here is just a tad of the XAML:
 
<UserControl.Resources>
        <ControlTemplate x:Key="MyButton" TargetType="Button">
            <Grid>
              ...

Go to the complete details ...