共用方式為


CompositionEffectSourceParameter 類別

定義

用來 (String) 宣告任意名稱,以 (「效果來源」) 與 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

與效果來源相關聯的名稱。

適用於

另請參閱