Change VisualState through Dependency Property (UWP)
问题 I have a textbox inside a UserControl, I want to have two extra states for that textbox, Valid and Invalid. My code looks like this <UserControl.Resources> <Style TargetType="TextBox" x:Key="ExtendeTextBoxStyle"> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="TextBox"> <Grid> <VisualStateManager.VisualStateGroups> <VisualStateGroup x:Name="ValidationState"> <VisualState x:Name="InvalidState"> <Storyboard> <ObjectAnimationUsingKeyFrames Storyboard.TargetName=