ExportEffectAttribute クラス

定義

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

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

注釈

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

適用対象

こちらもご覧ください