UIElement.BitmapEffect Propriedade

Definição

Cuidado

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.

Cuidado

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

Obtém ou define um efeito de bitmap aplicado diretamente ao conteúdo renderizado para este elemento. É uma propriedade de dependência.

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 da propriedade

BitmapEffect

O efeito de bitmap a ser aplicado.

Atributos

Exemplos

O exemplo a seguir define um efeito bitmap usando 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;

Comentários

BitmapEffect é um tipo abstrato, portanto, o uso de XAML requer uma classe derivada implementada de BitmapEffect, como OuterGlowBitmapEffect. Observe que uma classe derivada implementada é um tipo de coleção que permite que você especifique mais de uma sequencial BitmapEffectusando uma sintaxe de marca aninhada.

Nenhuma classe derivada existente dá BitmapEffect suporte a um conversor de tipo, portanto, a sintaxe XAML que você usa para essa propriedade é geralmente a sintaxe do elemento de propriedade.

Informações da propriedade de dependência

Campo identificador BitmapEffectProperty
Propriedades de metadados definidas como true Nenhum

Aplica-se a