1
我VisualStateManager
当国家发生的控制,控制有效:绑定和VisualStateManager不共同努力
这里是状态(串)的属性:
states:StateManager.VisualStateProperty="{Binding SomeProp}"
这里VisualStateManager
:
<VisualStateManager.VisualStateGroups>
<VisualStateGroup x:Name="VisualStateGroup">
<VisualState x:Name="MyName">
<Storyboard>
<BooleanAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.IsEnabled)" Storyboard.TargetName="MyTextBox">
<DiscreteBooleanKeyFrame KeyTime="0" Value="True" />
</BooleanAnimationUsingKeyFrames>
</Storyboard>
</VisualState>
<VisualState x:Name="HerName">
<Storyboard>
...
</Storyboard>
</VisualState>
<VisualState x:Name="This">
<Storyboard>
...
</Storyboard>
</VisualState>
</VisualStateGroup>
</VisualStateManager.VisualStateGroups>
这里我的文本框:
<TextBox Name="MyTextBox" />
我的问题是:会发生什么事,当我添加文本框下面一行:
IsEnable= {Binding isProp}// isProp = bool
我看到它的方式,它消除了TextBox
的IsEnable
并没有提到他,只为State
。
这是真的吗?他们都有办法吗?