控件的位图效果 [英] Bitmap effects for controls
本文介绍了控件的位图效果的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好,
我想将bitmapeffect赋予按钮,矩形等控件.
但是Framework 4.0不支持bitmapeffects.
Hi All,
I want to give bitmapeffect to controls like button, rectangle etc.
But Framework 4.0 do not support the bitmapeffects.
System.Windows.Controls.Label templabel = element as System.Windows.Controls.Label;
if (tempbutton.Name == "Raised")
{
System.Windows.Media.Effects.BevelBitmapEffect bev = new System.Windows.Media.Effects.BevelBitmapEffect();
bev.LightAngle = 120;
bev.BevelWidth = 10;
bev.Relief = 0.2;
bev.Smoothness = 0.2;
bev.EdgeProfile = System.Windows.Media.Effects.EdgeProfile.CurvedIn;
templabel.BitmapEffect = bev;
}
在上面的代码中,它在
给我警告
templabel.BitmapEffect = bev;
并且提高的效果不适用于控件.
其他解决方案又该怎么办?
谢谢
In above code it gives me warning at
templabel.BitmapEffect = bev;
and raised effect is not applied to control.
What should bw the other solution?
Thanks
推荐答案
^ ]
检查此链接
http://stackoverflow.com/questions/2862870/net-framework-4-in-wpf-not-showing-bitmap-effect[^]
check this link
这篇关于控件的位图效果的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文