Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

UIElement.BitmapEffect Property

Note: This API is now obsolete.

Gets or sets a bitmap effect that applies directly to the rendered content for this element. This is a dependency property.

Namespace:  System.Windows
Assembly:  PresentationCore (in PresentationCore.dll)
[ObsoleteAttribute("BitmapEffects are deprecated and no longer function.  Consider using Effects where appropriate instead.")]
public BitmapEffect BitmapEffect { get; set; }

Property Value

Type: System.Windows.Media.Effects.BitmapEffect
The bitmap effect to apply.

Identifier field

BitmapEffectProperty

Metadata properties set to true

None

BitmapEffect is an abstract type, therefore the XAML usage requires an implemented derived class of BitmapEffect, such as OuterGlowBitmapEffect. Note that one implemented derived class is a collection type that allows you to specify more than one sequential BitmapEffect, using a nested tag syntax.

No existing derived class of BitmapEffect supports a type converter, so the XAML syntax that you use for this property is generally property element syntax.

The following example sets a bitmap effect, using BlurBitmapEffect.

// Get a reference to the Button.
Button myButton = (Button)sender;

// Initialize a new BlurBitmapEffect that will be applied 
// to the Button.
BlurBitmapEffect myBlurEffect = new BlurBitmapEffect();

// Set the Radius property of the blur. This determines how  
// blurry the effect will be. The larger the radius, the more 
// blurring. 
myBlurEffect.Radius = 10;

// Set the KernelType property of the blur. A KernalType of "Box" 
// creates less blur than the Gaussian kernal type.
myBlurEffect.KernelType = KernelType.Box;

// Apply the bitmap effect to the Button.
myButton.BitmapEffect = myBlurEffect;

.NET Framework

Supported in: 3.5, 3.0
Obsolete (compiler warning) in 4.5.1
Obsolete (compiler warning) in 4.5
Obsolete (compiler warning) in 4
Obsolete (compiler warning) in 3.5 SP1
Obsolete (compiler warning) in 3.0 SP2

.NET Framework Client Profile

Obsolete (compiler warning) in 4
Obsolete (compiler warning) in 3.5 SP1

Windows Phone 8.1, Windows Phone 8, Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Show:
© 2014 Microsoft. All rights reserved.