Share via


Compositor.CreateBackdropBrush Method

Definition

Creates an instance of CompositionBackdropBrush.

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

Returns

Returns the created CompositionBackdropBrush object.

Examples

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

Remarks

See the remarks section of CompositionEffectBrush for information on creating and using effects.

Applies to