I want to have Border controls to change color when the mouse is hovering over them. I know how to achieve this by subscribing to controls events. However, I have recently discovered the VisualStateManager mechanism and currently confused about when or why should I use it.
It seems that all VisualStates mechanic was meant to allow configuring controls response to user interactions within the XAML. I couldn't set up a VisualState at runtime, only trigger predefined states. Is this assessment correct?
How should I set up VisualStates for controls created programmatically during runtime? Seems I can define a template within a style, and then apply the style to the created control, correct?
VisualStates are somehow connected to Triggers, I assume by name, but there is no property PointerOver, so how come there is a StateTrigger for it?
How should I neutrelize VisualStates of existing controls. For example, I want Buttons not to respond when mouse is hovered over them or if pressed. I would assume again by defining a template within a style and then applying the style, right?
Researched contributed to this point