【发布时间】:2015-03-22 02:44:02
【问题描述】:
我的 TextBlock 已绑定到我的视图模型,我想在文本更改时闪烁文本。我发现很难为 Windows Phone 8.1 (WinRT) 实现这一点。我想我必须使用 EventTriggerBehavior 并将 textBlock 更改为 textBox 然后选择“TextChanged”事件。有没有简单的方法可以做到这一点?
这是我尝试使用 TextBox 并使用 EventTriggerBehavior。
<TextBlock x:Name="TestTypeTextBox"
TextWrapping="Wrap"
Text="{Binding TestTypeText}"
FontSize="48" TextAlignment="Center"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Margin="0"
FontWeight="Bold"
FontFamily="Segoe UI Black"
Foreground="White"
Padding="0">
<i:Interaction.Behaviors>
<core:EventTriggerBehavior EventName="SelectionChanged">
<Media:ControlStoryboardAction Storyboard="{StaticResource FlashingText}"/>
</core:EventTriggerBehavior>
</i:Interaction.Behaviors>
</TextBlock>
【问题讨论】:
标签: windows xaml windows-runtime windows-phone-8.1 expression-blend