UIElement.BitmapEffect Propiedad

Definición

Precaución

Avoid using BitmapEffects as they have very poor performance characteristics. They will be deprecated in a future version. Consider using the UIElement.Effect property and ShaderEffects where appropriate instead.

Precaución

BitmapEffects are deprecated and no longer function. Consider using Effects where appropriate instead.

Obtiene o establece un efecto de imagen que se aplica directamente al contenido representado de este elemento. Es una propiedad de dependencia.

public:
 property System::Windows::Media::Effects::BitmapEffect ^ BitmapEffect { System::Windows::Media::Effects::BitmapEffect ^ get(); void set(System::Windows::Media::Effects::BitmapEffect ^ value); };
[System.Obsolete("Avoid using BitmapEffects as they have very poor performance characteristics.  They will be deprecated in a future version.  Consider using the UIElement.Effect property and ShaderEffects where appropriate instead.")]
public System.Windows.Media.Effects.BitmapEffect BitmapEffect { get; set; }
[System.Obsolete("BitmapEffects are deprecated and no longer function.  Consider using Effects where appropriate instead.")]
public System.Windows.Media.Effects.BitmapEffect BitmapEffect { get; set; }
[<System.Obsolete("Avoid using BitmapEffects as they have very poor performance characteristics.  They will be deprecated in a future version.  Consider using the UIElement.Effect property and ShaderEffects where appropriate instead.")>]
member this.BitmapEffect : System.Windows.Media.Effects.BitmapEffect with get, set
[<System.Obsolete("BitmapEffects are deprecated and no longer function.  Consider using Effects where appropriate instead.")>]
member this.BitmapEffect : System.Windows.Media.Effects.BitmapEffect with get, set
Public Property BitmapEffect As BitmapEffect

Valor de propiedad

BitmapEffect

Efecto de imagen que se va a aplicar.

Atributos

Ejemplos

En el ejemplo siguiente se establece un efecto de mapa de bits mediante 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;

Comentarios

BitmapEffect es un tipo abstracto, por lo que el uso de XAML requiere una clase derivada implementada de BitmapEffect, como OuterGlowBitmapEffect. Tenga en cuenta que una clase derivada implementada es un tipo de colección que permite especificar más de un secuencial BitmapEffect, mediante una sintaxis de etiqueta anidada.

Ninguna clase derivada existente de admite un convertidor de BitmapEffect tipos, por lo que la sintaxis XAML que se usa para esta propiedad suele ser sintaxis de elemento de propiedad.

Información sobre propiedades de dependencia

Campo identificador BitmapEffectProperty
Propiedades de metadatos establecidas en true Ninguno

Se aplica a