CompositionEffectSourceParameter 类

定义

用于 (与 CompositionBrush 关联的字符串) 声明任意名称, (“效果源”) 。 当调用 CompositionEffectBrushSetSourceParameter 方法时,将发生给定名称与效果源的关联。

public ref class CompositionEffectSourceParameter sealed : IGraphicsEffectSource
/// [Windows.Foundation.Metadata.Activatable(Microsoft.UI.Composition.ICompositionEffectSourceParameterFactory, 65536, "Microsoft.Foundation.LiftedContract")]
/// [Windows.Foundation.Metadata.ContractVersion(Microsoft.Foundation.LiftedContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class CompositionEffectSourceParameter final : IGraphicsEffectSource
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
/// [Windows.Foundation.Metadata.Activatable(Microsoft.UI.Composition.ICompositionEffectSourceParameterFactory, 65536, "Microsoft.Foundation.WindowsAppSDKContract")]
/// [Windows.Foundation.Metadata.ContractVersion(Microsoft.Foundation.WindowsAppSDKContract, 65536)]
class CompositionEffectSourceParameter final : IGraphicsEffectSource
[Windows.Foundation.Metadata.Activatable(typeof(Microsoft.UI.Composition.ICompositionEffectSourceParameterFactory), 65536, "Microsoft.Foundation.LiftedContract")]
[Windows.Foundation.Metadata.ContractVersion(typeof(Microsoft.Foundation.LiftedContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public sealed class CompositionEffectSourceParameter : IGraphicsEffectSource
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
[Windows.Foundation.Metadata.Activatable(typeof(Microsoft.UI.Composition.ICompositionEffectSourceParameterFactory), 65536, "Microsoft.Foundation.WindowsAppSDKContract")]
[Windows.Foundation.Metadata.ContractVersion(typeof(Microsoft.Foundation.WindowsAppSDKContract), 65536)]
public sealed class CompositionEffectSourceParameter : IGraphicsEffectSource
function CompositionEffectSourceParameter(name)
Public NotInheritable Class CompositionEffectSourceParameter
Implements IGraphicsEffectSource
继承
Object Platform::Object IInspectable CompositionEffectSourceParameter
属性
实现

示例

// Create an effect description 
GaussianBlurEffect blurEffect = new GaussianBlurEffect() 
{ 
    Name = "Blur", 
    BlurAmount = 1.0f, 
    BorderMode = EffectBorderMode.Hard, 
    Optimization = EffectOptimization.Balanced 
}; 

blurEffect.Source = new CompositionEffectSourceParameter("source"); 

注解

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

构造函数

CompositionEffectSourceParameter(String)

创建 CompositionEffectSourceParameter 的实例。

属性

Name

与效果源关联的名称。

适用于

另请参阅