Live Chat Icon For mobile
Live Chat Icon

How do I apply BitmapEffect to a particular area of an Image ?

Platform: WPF| Category : 2D Graphics, Visual Layer

BitmapEffect can be applied to a particular area of an Image using the ‘BitmapEffectInput’ property of the ‘Image’ class. ‘AreaToApplyEffect’ property of the BitmapEffectInput markup extension is used to specify the area and ‘AreaToApplyEffectUnits’ property is used to specify the units.

The following lines of code are used to apply BitmapEffect to a lower part of the image.

[XAML]

<Image Source='pda.ico' Height='160' Width='160'>
<Image.BitmapEffect>
      	<BevelBitmapEffect BevelWidth='10' EdgeProfile='BulgedUp'/>
</Image.BitmapEffect>
<Image.BitmapEffectInput>
<BitmapEffectInput AreaToApplyEffect='0,0.5,1,0.5' AreaToApplyEffectUnits='RelativeToBoundingBox'/>
</Image.BitmapEffectInput>
</Image>

Share with

Related FAQs

Couldn't find the FAQs you're looking for?

Please submit your question and answer.