ExportEffectAttribute 类
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
使用唯一标识符识别 Effect 的特性,可与 Resolve(String) 配合使用以查找效果。
public ref class ExportEffectAttribute sealed : Attribute
[System.AttributeUsage(System.AttributeTargets.Assembly, AllowMultiple=true)]
public sealed class ExportEffectAttribute : Attribute
[<System.AttributeUsage(System.AttributeTargets.Assembly, AllowMultiple=true)>]
type ExportEffectAttribute = class
inherit Attribute
Public NotInheritable Class ExportEffectAttribute
Inherits 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。 |
适用于
另请参阅
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈