首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 媒体动画 > CAD教程 >

Window的ScaleTransform动画有有关问题

2012-03-27 
Window的ScaleTransform动画有问题对Window的(UserControl.RenderTransform).(ScaleTransform.ScaleX)做动

Window的ScaleTransform动画有问题
对Window的(UserControl.RenderTransform).(ScaleTransform.ScaleX)做动画
让窗口加载的时候从小到大,结果window在做动画的时候背景为黑色?
哪位大侠遇到过,这个问题怎么解决

[解决办法]
我还是转贴一个比较'官方'的解释吧,原文的上下文我还没搞明白,不过有这么一段:

Value coercion plays an important role in dependency properties and comes into play when the value of a dependency property is set. By supplying a CoerceValueCallback argument, it is possible to alter the value to which the property is being set. An example of value coercion is when setting the value of the System.Windows.Window.RenderTransform property. It is not valid to set the RenderTransform property of a window to anything other than an identity matrix. If any other value is used, an exception is thrown. It should be noted that any coercion callback methods are invoked before any System.Windows.ValidateValueCallback methods. 

--"WPF Recipes in C# 2008", 电子书的第十页.

热点排行