ResolutionGroupNameAttribute 類別
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
識別群組名稱的屬性,通常是公司名稱或反轉的公司 URL,且提供效果名稱的範圍。
[System.AttributeUsage(System.AttributeTargets.Assembly)]
public sealed class ResolutionGroupNameAttribute : Attribute
type ResolutionGroupNameAttribute = class
inherit Attribute
- 繼承
-
ResolutionGroupNameAttribute
- 屬性
備註
開發人員必須提供其提供給 ResolutionGroupNameAttribute 之 範圍的唯一名稱 ExportEffectAttribute 。 方法 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) |
建立新的解析群組名稱屬性。 |