AttachedPropertyBrowsableForTypeAttribute 类
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
指定附加属性只能供从指定类型派生的元素浏览。
public ref class AttachedPropertyBrowsableForTypeAttribute sealed : System::Windows::AttachedPropertyBrowsableAttribute
[System.AttributeUsage(System.AttributeTargets.Method, AllowMultiple=true)]
public sealed class AttachedPropertyBrowsableForTypeAttribute : System.Windows.AttachedPropertyBrowsableAttribute
[<System.AttributeUsage(System.AttributeTargets.Method, AllowMultiple=true)>]
type AttachedPropertyBrowsableForTypeAttribute = class
inherit AttachedPropertyBrowsableAttribute
Public NotInheritable Class AttachedPropertyBrowsableForTypeAttribute
Inherits AttachedPropertyBrowsableAttribute
- 继承
- 属性
注解
此 .NET Framework 属性的说明中使用的术语browsable
的含义类似于为 BrowsableAttribute提供的说明,但附加属性的可浏览状态与 Extensible Application Markup Language (XAML) 的属性信息特别相关,因为附加属性主要是 XAML 概念。
如果为AttachedPropertyBrowsableForTypeAttribute.NET Framework属性指定了多个类型,则如果任何指定的类型匹配 (逻辑或) ,则属性是可浏览的。 类型也可以是接口。
此.NET Framework属性指定 AllowMultipletrue
。
此.NET Framework属性应仅应用于附加属性定义的 get 访问器。 不要将此.NET Framework属性应用于 set 访问器。 尽管直观地来说,设置操作正在使相关元素上的 XAML 变得可浏览,但属性定义元素上的 get 访问器的存在和特征控制了真实行为。
有关声明附加属性的一般信息,请参阅 附加属性概述。
构造函数
AttachedPropertyBrowsableForTypeAttribute(Type) |
使用提供的 |
属性
TargetType |
获取基类型,该类型限定此.NET Framework属性适用的附加属性的使用范围。 |
TypeId |
获取此AttachedPropertyBrowsableForTypeAttribute.NET Framework属性的唯一类型标识符。 |
方法
Equals(Object) |
确定当前AttachedPropertyBrowsableForTypeAttribute.NET Framework属性是否等于指定的对象。 |
GetHashCode() |
返回此AttachedPropertyBrowsableForTypeAttribute.NET Framework属性的哈希代码。 |
GetType() |
获取当前实例的 Type。 (继承自 Object) |
IsDefaultAttribute() |
在派生类中重写时,指示此实例的值是否是派生类的默认值。 (继承自 Attribute) |
Match(Object) |
当在派生类中重写时,返回一个指示此实例是否等于指定对象的值。 (继承自 Attribute) |
MemberwiseClone() |
创建当前 Object 的浅表副本。 (继承自 Object) |
ToString() |
返回表示当前对象的字符串。 (继承自 Object) |
显式接口实现
_Attribute.GetIDsOfNames(Guid, IntPtr, UInt32, UInt32, IntPtr) |
将一组名称映射为对应的一组调度标识符。 (继承自 Attribute) |
_Attribute.GetTypeInfo(UInt32, UInt32, IntPtr) |
检索对象的类型信息,然后可以使用该信息获取接口的类型信息。 (继承自 Attribute) |
_Attribute.GetTypeInfoCount(UInt32) |
检索对象提供的类型信息接口的数量(0 或 1)。 (继承自 Attribute) |
_Attribute.Invoke(UInt32, Guid, UInt32, Int16, IntPtr, IntPtr, IntPtr, IntPtr) |
提供对某一对象公开的属性和方法的访问。 (继承自 Attribute) |
适用于
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈