ExportEffectAttribute クラス

定義

アラートを見つけるために Resolve(String) で使用できる一意の識別子によって Effect を識別する属性。

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

注釈

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

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

[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"));

コンストラクター

ExportEffectAttribute(Type, String)

新しい ExportEffectAttribute を作成します。

適用対象

こちらもご覧ください