I have a TabItem style that has VisualStates.
<VisualState x:Name="MouseOver">
</VisualState>
Now I want to have a custom visual state and manually set the state to codebehind instead of relying on the MouseOver event.
<VisualState x:Name="CustomVisualState">
</VisualState>
Then I need to install it in CodeBehind.
MyTabItem.VisualState = CustomVisualState.
source
share