共用方式為


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 的備註一節。

適用於