英語で読む

次の方法で共有


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.

この要素に描画された内容に直接適用するビットマップ効果を取得または設定します。 これは依存関係プロパティです。

C#
[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; }
C#
[System.Obsolete("BitmapEffects are deprecated and no longer function.  Consider using Effects where appropriate instead.")]
public System.Windows.Media.Effects.BitmapEffect BitmapEffect { get; set; }

プロパティ値

BitmapEffect

適用するビットマップ効果。

属性

次の使用例は、ビットマップ効果を設定します BlurBitmapEffect

C#
// 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 の使用には、次のようなOuterGlowBitmapEffect実装された派生クラスBitmapEffectが必要です。 実装された派生クラスの 1 つは、入れ子になったタグ構文を使用して、複数のシーケンシャル BitmapEffectを指定できるコレクション型であることに注意してください。

型コンバーターをサポートする既存の BitmapEffect 派生クラスがないため、このプロパティに使用する XAML 構文は一般にプロパティ要素の構文です。

依存プロパティ情報

識別子フィールド BitmapEffectProperty
に設定されたメタデータ プロパティ true なし

適用対象

製品 バージョン (廃止)
.NET Framework (3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8)
Windows Desktop (3.0, 3.1, 5, 6, 7)