问题描述
如何使用动画尝试更改标签的背景属性 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(); 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 这篇关于标签背景属性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!推荐答案