SIGN UP MEMBER LOGIN:    
ARTICLE

Bitmap Effects In WPF - Part III

Posted by Diptimaya Patra Articles | WPF with C# April 08, 2010
In previous article we saw remaining three effects DropShadow, Bevel and Emboss. In this article we will see how to group effects, and we will see how we can achieve the effects with triggers.
Reader Level:
Download Files:
 

Group Effects

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

If you see in XAML behind, we have this:

Clipboard01.gif

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!

Clipboard02.gif

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

Clipboard03.gif

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!

Clipboard04.gif

And to apply the styles use as following:

Clipboard05.gif

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

Clipboard06.gif

Hope this article helps.

Login to add your contents and source code to this article
share this article :
post comment
 
Nevron Gauge for SharePoint
Become a Sponsor
PREMIUM SPONSORS
  • Finally – a virtual platform that delivers next-generation Windows Server 2008 Hyper-V virtualization technology from a managed hosting partner you can truly depend on. Visit www.maximumasp.com/max for a FREE 30 day trial. Hurry offer ends soon. Climb aboard the MaxV platform and take advantage of High Availability, Intelligent Monitoring, Recurrent Backups, and Scalability – with no hassle or hidden fees. As a managed hosting partner focused solely on Microsoft technologies since 2000, MaximumASP is uniquely qualified to provide the superior support that our business is built on. Unparalleled expertise with Microsoft technologies lead to working directly with Microsoft as first to offer IIS 7 and SQL 2008 betas in a hosted environment; partnering in the Go Live Program for Hyper-V; and product co-launches built on WS 2008 with Hyper-V technology.
    The leading .NET charting control now features PDF, Flash and Silverlight export, visualization of large datasets and more. Deliver true charting functionality to your BI, Scorecard, Presentation or Scientific apps. Download evaluation now.
Nevron Gauge for SharePoint
Become a Sponsor