UIElement.BitmapEffect Свойство

Определение

Внимание!

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.

Внимание!

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

Получение или установка эффекта для точечных рисунков, который применяется непосредственно к отображаемому содержимому этого элемента. Это свойство зависимостей.

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

Значение свойства

BitmapEffect

Применяемый эффект точечного рисунка.

Атрибуты

Примеры

В следующем примере задается эффект растрового изображения с помощью 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;

Комментарии

BitmapEffect является абстрактным типом, поэтому для использования XAML требуется реализованный производный класс BitmapEffect, например OuterGlowBitmapEffect. Обратите внимание, что один реализованный производный класс — это тип коллекции, который позволяет указать несколько последовательных BitmapEffectтегов с использованием синтаксиса вложенных тегов.

Существующий производный BitmapEffect класс не поддерживает преобразователь типов, поэтому синтаксис XAML, используемый для этого свойства, обычно является синтаксисом элемента свойства.

Сведения о свойстве зависимостей

Поле идентификатора BitmapEffectProperty
Metadata properties set to true Нет

Применяется к