AttachedPropertyBrowsableForTypeAttribute 類別

定義

指定附加屬性僅供衍生自指定類型的項目瀏覽。

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
繼承
AttachedPropertyBrowsableForTypeAttribute
屬性

備註

這個.NET Framework屬性的描述中使用的詞彙 browsable 意義類似于 提供 BrowsableAttribute 的描述,但是附加屬性的可流覽狀態與可延伸應用程式標記語言的屬性資訊特別相關, (XAML) ,因為附加屬性主要是 XAML 概念。

如果為 AttachedPropertyBrowsableForTypeAttribute .NET Framework屬性指定多個類型,則如果任何指定的型別 (符合邏輯或) ,則屬性可流覽。 此類型也可以是介面。

這個.NET Framework屬性會 AllowMultipletrue 指定 。

這個.NET Framework屬性應該只套用至附加屬性定義的 get 存取子上。 請勿將此.NET Framework屬性套用至 set 存取子。 雖然以直覺方式是讓相關元素上 XAML 可流覽的設定作業,但它是屬性上 get 存取子的存在和特性,可控制真實行為。

如需宣告附加屬性的一般資訊,請參閱 附加屬性概觀

建構函式

AttachedPropertyBrowsableForTypeAttribute(Type)

使用提供的 targetType 初始化 AttachedPropertyBrowsableForTypeAttribute 類別的新執行個體。

屬性

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)

將一組名稱對應至一組對應的分派識別項 (Dispatch Identifier)。

(繼承來源 Attribute)
_Attribute.GetTypeInfo(UInt32, UInt32, IntPtr)

擷取物件的類型資訊,可以用來取得介面的類型資訊。

(繼承來源 Attribute)
_Attribute.GetTypeInfoCount(UInt32)

擷取物件提供的類型資訊介面數目 (0 或 1)。

(繼承來源 Attribute)
_Attribute.Invoke(UInt32, Guid, UInt32, Int16, IntPtr, IntPtr, IntPtr, IntPtr)

提供物件所公開的屬性和方法的存取權。

(繼承來源 Attribute)

適用於