UIElement.BitmapEffect Właściwość

Definicja

Przestroga

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.

Przestroga

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

Pobiera lub ustawia efekt mapy bitowej, który ma zastosowanie bezpośrednio do renderowanej zawartości dla tego elementu. Jest to właściwość zależności.

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

Wartość właściwości

BitmapEffect

Efekt mapy bitowej do zastosowania.

Atrybuty

Przykłady

Poniższy przykład ustawia efekt mapy bitowej przy użyciu polecenia 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;

Uwagi

BitmapEffect jest typem abstrakcyjnym, dlatego użycie XAML wymaga zaimplementowanej klasy pochodnej klasy BitmapEffect, takiej jak OuterGlowBitmapEffect. Należy pamiętać, że jedna zaimplementowana klasa pochodna jest typem kolekcji, który umożliwia określenie więcej niż jednej sekwencyjnej BitmapEffectskładni tagu przy użyciu składni tagu zagnieżdżonego.

Żadna istniejąca klasa pochodna konwertera BitmapEffect typów nie obsługuje konwertera typów, więc składnia XAML używana dla tej właściwości jest ogólnie składnią elementu właściwości.

Informacje dotyczące właściwości zależności

Pole identyfikatora BitmapEffectProperty
Właściwości metadanych ustawione na true Brak

Dotyczy