The BitmapEffect bitmap effect is a simple pixel processing operation. It can present several special effects.
Bevelbitmapeffect Bump Effect
blurbitmapeffect Blur effect
Dropshadowbitmapeffect Projection Effect
embossbitmapeffect emboss effect
outerglowbitmapeffect Color Glow Effect
Bevelbitmapeffect
<Button.BitmapEffect> <bevelbitmapeffect x:name= "Testbevelbitmap" Bevelwidth= "20" Edgeprofile= "Curvedin" lightangle= "330" relief= "0.4" smoothness= "0.5"/> </Button.BitmapEffect> |
Bevelbitmapeffect Property Bevelwidth
Sets the width of the bevel effect. The default value is 5
Bevelbitmapeffect Property Edgeprofile
Sets the curve for the bevel effect. The default value is Linear
Bevelbitmapeffect Property Lightangle
The direction of the virtual light. The valid range is 0-360 (degrees), 0 indicates the right side of the object, and subsequent values indicate a counterclockwise movement around the object. The bump effect shadows are on the opposite side of the light projection position. The default value is 135.
The following illustration shows the direction of the light for a given value for this property. The bump shadow is projected on the opposite side of the light angle.
The following illustration shows the effect of this property:
Bevelbitmapeffect Property Relief
The height at which the bump effect is undulating. The valid range is between 0 and 1, and 1 represents the largest fluctuation (darkest shadow). The default value is 0.3.
The following illustration shows the effect of this property
Bevelbitmapeffect Property Smoothness
A value that indicates how smooth the bevel shadow is. The valid range is between 0 and 1, and 1 indicates the smoothest. The default value is 0.2.
Blurbitmapeffect
<Button.BitmapEffect> <blurbitmapeffect x:name= "Testblurbitmapeffect" Radius= "8" Kerneltype= "Gaussian"/> </Button.BitmapEffect> |
blurbitmapeffect Attribute Radius
The radius used to blur the kernel. The larger the radius, the more blurred the effect. The default value is 5
Blurbitmapeffect Property Kerneltype
The types of fuzzy kernels Gaussian and box. The default value is Gaussian
Dropshadowbitmapeffect
<Button.BitmapEffect> <dropshadowbitmapeffect x:name= "Testdropshadowbitmapeffect" Color= "Blue" Shadowdepth= "20" noise= "0.5" opacity= "0.5" Direction= "/>" </Button.BitmapEffect> |
color of the Dropshadowbitmapeffect attribute
The color of the shadow. Default value is black
the shadowdepth of Dropshadowbitmapeffect property
The distance between the plane of the projection object and the shadow plane, the valid range of values from 0 to 300. The default value is 5.
The following illustration shows the effect of this property
the noise of Dropshadowbitmapeffect property
The noise level of the shadow. The valid range of values is from 0 to 1. A value of 0 indicates no noise, and a value of 1 indicates the maximum noise. A value of 0.5 indicates a 50% noise, and a value of 0.75 indicates a 75% noise, and so on. The default value is 0.
The following illustration shows the effect of this property:
the opacity of Dropshadowbitmapeffect property
Opacity. The valid range of values is from 0 to 1. A value of 0 indicates that the shadow is completely transparent, and if the value is 1, the shadow is completely opaque. A value of 0.5 indicates that the shadow opacity is 50%, and if the value is 0.725, the shadow opacity is 72.5%, and so on. Values less than 0 will be treated as 0, and values greater than 1 will be treated as 1. The default value is 1.
The following illustration shows the effect of this property:
the direction of Dropshadowbitmapeffect property
Projection angle. The valid range of values is from 0 to 360. If the value is 0, the direction clings to the right side of the object. Subsequent values move around the object in a counterclockwise direction. For example, a value of 90 indicates that the shadow is projected directly above the object, and if the value is 180, the shadow is projected directly to the left of the object, and so on. The default value is 315.
The following illustration shows the direction in which the shadow is projected for the given value of the property. Note: different from Lightangle
The following illustration shows the effect of this property:
Embossbitmapeffect
<Image.BitmapEffect> <embossbitmapeffect x:name= "Testembossbitmapeffect" Lightangle= "120" relief= "0.1"/> </Image.BitmapEffect> |
the Lightangle of Embossbitmapeffect property
The direction of the artificial light that is projected on the Emboss effect object. The valid range is 0-360 (degrees), 0 indicates the right side of the object, and subsequent values indicate a counterclockwise movement around the object. The default value is 45.
the relief of Embossbitmapeffect property
The undulating size of the emboss. Valid values range from 0-1, where 0 is the smallest and 1 ups and downs are the largest. The default value is 0.44.
Outerglowbitmapeffect
<TextBox.BitmapEffect> <outerglowbitmapeffect x:name= "Testouterglowbitmapeffect" Glowcolor= "Red" Glowsize= "30" noise= "0.5" opacity= "0.5"/> </TextBox.BitmapEffect> |
the Glowcolor of Outerglowbitmapeffect property
The color of the halo glow. Default value is white
the Glowsize of Outerglowbitmapeffect property
The thickness of the halo glow, the value of the effective range from 1 to 199. The default value is 20.
the noise of Outerglowbitmapeffect property
The particle size (noise level) of the halo glow. The valid range of values is from 0.0 to 1.0. A value of 0.0 indicates no noise, and a value of 1.0 indicates the maximum noise. A value of 0.5 indicates a 50% noise, and a value of 0.75 indicates a 75% noise, and so on. The default value is 0.0.
the opacity of Outerglowbitmapeffect property
The level of opacity of the glow. A value of 0 indicates that the halo glow is completely transparent, and if the value is 1, the glow is completely opaque. A value of 0.5 indicates a luminous transparency of 50%, and a value of 0.725 indicates a luminous transparency of 72.5%, and so on. Values less than 0 will be treated as 0, and values greater than 1 will be treated as 1. The default value is 1.