ResolutionGroupNameAttribute クラス

定義

効果名の範囲を提供するグループ名 (一般的には会社名または逆にした会社 URL) を識別する属性。

[System.AttributeUsage(System.AttributeTargets.Assembly)]
public sealed class ResolutionGroupNameAttribute : Attribute
type ResolutionGroupNameAttribute = class
    inherit Attribute
継承
System.Attribute
ResolutionGroupNameAttribute
属性
System.AttributeUsageAttribute

注釈

開発者は、 に ExportEffectAttribute 指定する のスコープに対して一意の 名前を指定する ResolutionGroupNameAttribute必要があります。 メソッドはResolve(String)、(解決グループ名)'.'、、および に指定された一意のname名前を連結した文字列をExportEffectAttribute受け取り、指定した効果を返します。

たとえば、 宣言では次のようになります。

[assembly: ResolutionGroupName ("com.YourCompany")]
[assembly: ExportEffect (typeof (ShadowEffect), "ShadowEffect")]

次のコードは、ボタンに効果を追加します。

        [var button = new Button { Text = "I have a shadow" };
button.Effects.Add (Effect.Resolve ("com.YourCompany.ShadowEffect"));

コンストラクター

ResolutionGroupNameAttribute(String)

新しい解決グループ名属性を作成します。

適用対象