边框画笔颜色动画淡入淡出
我有一个边框,我在运行时更改它的边框画笔。 现在我需要这个边框一直发光,无论颜色是什么。
我尝试过这个,但我有问题。有人可以帮忙吗?
<Border Name="ActiveBorder" VerticalAlignment="Stretch" Height="auto" BorderBrush="Transparent" BorderThickness="2" >
<Border.Style>
<Style TargetType="{x:Type Border}">
<Style.Triggers>
<Trigger Property="Visibility" Value="Visible">
<Trigger.EnterActions>
<BeginStoryboard>
<Storyboard>
<ColorAnimation AutoReverse="True" RepeatBehavior="Forever" Storyboard.TargetProperty="BorderBrush" Duration="00:00:01" To="Transparent"></ColorAnimation>
</Storyboard>
</BeginStoryboard>
</Trigger.EnterActions>
</Trigger>
</Style.Triggers>
</Style>
</Border.Style>
i have a border , and i change it's borderbrush in the run time.
now i need this border to be glowing all the time, whatever the color was.
i tried this but i have problems. any one can help?
<Border Name="ActiveBorder" VerticalAlignment="Stretch" Height="auto" BorderBrush="Transparent" BorderThickness="2" >
<Border.Style>
<Style TargetType="{x:Type Border}">
<Style.Triggers>
<Trigger Property="Visibility" Value="Visible">
<Trigger.EnterActions>
<BeginStoryboard>
<Storyboard>
<ColorAnimation AutoReverse="True" RepeatBehavior="Forever" Storyboard.TargetProperty="BorderBrush" Duration="00:00:01" To="Transparent"></ColorAnimation>
</Storyboard>
</BeginStoryboard>
</Trigger.EnterActions>
</Trigger>
</Style.Triggers>
</Style>
</Border.Style>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
尝试指定:
并指定:
或在动画中:
Try to specify:
and either specify:
or in the animation: