Click here to Skip to main content
12,702,995 members (31,182 online)
Rate this:
Please Sign up or sign in to vote.
See more: C# WPF
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;                       

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?

Posted 20-Nov-12 2:34am

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

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)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170118.1 | Last Updated 20 Nov 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100