I try to set the background color of a control when mouse is over it. I try to do it via the visual state manager. I was able to get the following code running:
Unfortunately the way you're trying to do it won't work in Silverlight. The VisualStateManager animations are not part of the display tree, so you can't use binding. You have options though, StaticResources (aka setting up colours in the resource dictionary) and code based animations are different workarounds (depending on exactly what you want to do). For the latter check out a thread where I asked a similar question: How can I animate a property dynamically in a Silverlight 4 UserControl?
You cannot do it dynamically on a single target, but what you can do is create another target (for example called BorderBackgroundAlt) whose background you can explicitly set to {TemplateBinding Tag} in its declaration.
Then you can have BorderBackgroundAlt collapsed by default, and in your animation frame instead of switching colors, switch visibilities, such that BorderBackground is collapsed and BorderBackgroundAlt is visible.