Click here to Skip to main content
15,886,873 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi All,

I want to give bitmapeffect to controls like button, rectangle etc.
But Framework 4.0 do not support the bitmapeffects.

C#
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;                       
                        }


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
Posted

1 solution

 
Share this answer
 
Comments
Rupali Jadhav 21-Nov-12 2:03am    
There is same problem in link provided by you. I want alternatives to do the same. I want apply raised and sunken effects to control dynamically. I want alternative to bitmap effect. If Effect is the alternative then Please tell me how to use it.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900