WPF中textBlock 变色功能
程序员文章站
2022-05-26 23:42:03
......
<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"/>
上一篇: 连路灯都在秀恩爱
下一篇: ASP.NET Forms 认证流程