.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Home >> Articles >> WPF >> Post New Resource Bookmark and Share   

 Subscribe to Articles

WPF Bitmap Effects Tutorial - Part III

Posted By:Diptimaya Patra       Posted Date: May 30, 2010    Points: 25    Category: WPF    URL: http://www.dotnetspark.com  

WPF Bitmap Effects Tutorial - Part III. In this tutorial we will see how to group effects, and we will see how we can achieve the effects with triggers.

Group Effects

Suppose we need multiple effects for controls. We can achieve this by grouping the effects.

You may interested the Part I and Part II of the same tutorial series

If you see in XAML behind, we have this:


Let's see how we can group multiple effects.

Let's say we need DropShadow as well as OuterGlow Bitmap effect for a TextBlock then how can we achieve this!


As you see in above XAML display, we have both effects with different colors.


Like this you can do effect combinations based on your imagination!

Effect When Event is Triggered

An effect can be triggered by an event, such as MouseOver, Focus, etc.

Let's have two triggers for two different controls, first one will be for image when we MouseOver the Image would have OuterGlow and the second one will be for a Focused and it would have OuterGlow effect.

Let's do it!


Code view of the above image



And to apply the styles use as following:


Code view of the above image

Now we can have the following effects when MouseOver or Focus for respective controls.


You can also download the sample project used in the above article.

Hope this article helps.

 Subscribe to Articles


Further Readings:


No response found. Be the first to respond this post

Post Comment

You must Sign In To post reply
Find More Articles on C#, ASP.Net, Vb.Net, SQL Server and more Here

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend