WPF中textBlock 变色功能
程序员文章站
2022-11-25 17:17:45
......
<window.resources> <storyboard x:key="onloaded" repeatbehavior="forever" autoreverse="true" > <coloranimationusingkeyframes storyboard.targetproperty="(foreground).(solidcolorbrush.color)" storyboard.targetname="btn_register"> <easingcolorkeyframe keytime="0:0:1" value="lightblue"/> <easingcolorkeyframe keytime="0:0:2" value="lightgreen"/> </coloranimationusingkeyframes> </storyboard> </window.resources> <window.triggers> <eventtrigger routedevent="frameworkelement.loaded"> <beginstoryboard storyboard="{staticresource onloaded}"/> </eventtrigger> </window.triggers>
<button name="btn_register" margin="62,26,-60,2" content="新用户注册" command="{binding path=registercmd}" foreground="#ff91b9ea" grid.column="2" width="auto" fontweight="bold" fontsize="14"/>
上一篇: 爆笑动态图片,够你一笑一整天
下一篇: 让我看看你的腹肌