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
。
這是真的嗎?他們都有辦法嗎?