What is the following error?
Ambiguous type reference. A type named \'VisualState\' occurs in at least two namespaces, \'System.Windows\' and \'System
This error(most of the time warning) will occur when using two or more references which contains same namespace and classes. in your case you are using VisualState which is part of PresentationFramework assembly and you might have added another assembly which contains same "VisualState" object with the same namespace "System.Windows" .
you can resolve the error using following imports in your xaml
xmlns:vsm ="clr-namespace:System.Windows;assembly=PresentationFramework"
instead of using
<VisualState x:Name="Pressed">
<Storyboard>
</Storyboard>
</VisualState>
Use:
<vsm:VisualState x:Name="Pressed">
<Storyboard>
</Storyboard>
</vsm:VisualState>