Compositor.CreateBackdropBrush 方法

定义

创建 CompositionBackdropBrush 的实例。

public:
 virtual CompositionBackdropBrush ^ CreateBackdropBrush() = CreateBackdropBrush;
CompositionBackdropBrush CreateBackdropBrush();
public CompositionBackdropBrush CreateBackdropBrush();
function createBackdropBrush()
Public Function CreateBackdropBrush () As CompositionBackdropBrush

返回

返回创建的 CompositionBackdropBrush 对象。

Windows 要求

设备系列
Windows 10 Anniversary Edition (在 10.0.14393.0 中引入)
API contract
Windows.Foundation.UniversalApiContract (在 v3.0 中引入)

示例

// 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); 

注解

有关创建和使用效果的信息,请参阅 CompositionEffectBrush 的备注部分。

适用于