-api-id | -api-type |
---|---|
M:Microsoft.UI.Composition.Compositor.CreateBackdropBrush |
winrt method |
Creates an instance of CompositionBackdropBrush.
Returns the created CompositionBackdropBrush object.
See the remarks section of CompositionEffectBrush for information on creating and using effects.
// Create an effect description
GaussianBlurEffect blurEffect = new GaussianBlurEffect()
{
Name = "Blur",
BlurAmount = 1.0f,
BorderMode = EffectBorderMode.Hard,
Optimization = EffectOptimization.Balanced
};
blurEffect.Source = new CompositionEffectSourceParameter("source");
CompositionEffectFactory blurEffectFactory = _compositor.CreateEffectFactory(blurEffect);
CompositionEffectBrush blurBrush = blurEffectFactory.CreateBrush();
// Create a BackdropBrush and bind it to the EffectSourceParameter "source"
CompositionBackdropBrush backdropBrush = _compositor.CreateBackdropBrush();
blurBrush.SetSourceParameter("source", backdropBrush);