UIElement.BitmapEffect Proprietà

Definizione

Attenzione

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.

Attenzione

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

Recupera o imposta un effetto bitmap da applicare direttamente al contenuto renderizzato dell'elemento. Si tratta di una proprietà di dipendenza.

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

Valore della proprietà

BitmapEffect

Effetto bitmap da applicare.

Attributi

Esempio

Nell'esempio seguente viene impostato un effetto 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;

Commenti

BitmapEffect è un tipo astratto, pertanto l'utilizzo XAML richiede una classe derivata implementata di BitmapEffect, ad esempio OuterGlowBitmapEffect. Si noti che una classe derivata implementata è un tipo di raccolta che consente di specificare più di una sequenziale BitmapEffectusando una sintassi di tag annidata.

Nessuna classe derivata esistente di supporta un convertitore di BitmapEffect tipi, pertanto la sintassi XAML usata per questa proprietà è in genere la sintassi degli elementi di proprietà.

Informazioni proprietà di dipendenza

Campo Identificatore BitmapEffectProperty
Proprietà dei metadati impostate su true Nessuno

Si applica a