标签背景属性 [英] labels background property

查看:67
本文介绍了标签背景属性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

how to change a labels background property using animation i tried this

            我的部分代码是指主要代码

            some part of my code i mean main codes

    ColorAnimation highlightAnimation = new ColorAnimation();

             highlightAnimation.To = Colors.Transparent;

            highlightAnimation.To = Colors.Transparent;

             highlightAnimation.Duration = TimeSpan.FromSeconds(1);

            highlightAnimation.Duration = TimeSpan.FromSeconds(1);

             Storyboard.SetTargetProperty(highlightAnimation  ;,新的PropertyPath(Label.BackgroundProperty));

            Storyboard.SetTargetProperty(highlightAnimation , new PropertyPath(Label.BackgroundProperty));

storyboard.begin();

storyboard.begin();

它不起作用.给我有关BackgroundProperty的错误.如何克服它...如何通过动画更改背景.

its not working. giving me error for BackgroundProperty..how to over come it...how can change the background by animation.

推荐答案

查看此

http://stackoverflow.com/questions/2342085/label-background -animation-at-runtime-with-wpf


这篇关于标签背景属性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆