共用方式為


CategoryResourceAttribute 類別

表示類別,其中在屬性顯示在設為 [分類] 模式的 PropertyGrid 控制項中時群組屬性。

繼承階層架構

System.Object
  System.Attribute
    System.ComponentModel.CategoryAttribute
      Microsoft.VisualStudio.Modeling.Design.CategoryResourceAttribute

命名空間:  Microsoft.VisualStudio.Modeling.Design
組件:  Microsoft.VisualStudio.Modeling.Sdk.12.0 (在 Microsoft.VisualStudio.Modeling.Sdk.12.0.dll 中)

語法

'宣告
<AttributeUsageAttribute(AttributeTargets.Property, AllowMultiple := False)> _
Public NotInheritable Class CategoryResourceAttribute _
    Inherits CategoryAttribute
[AttributeUsageAttribute(AttributeTargets.Property, AllowMultiple = false)]
public sealed class CategoryResourceAttribute : CategoryAttribute

CategoryResourceAttribute 類型會公開下列成員。

建構函式

  名稱 描述
公用方法 CategoryResourceAttribute(String, Type) 使用指定的分類名稱索引鍵和型別,初始化 CategoryResourceAttribute 類別的新執行個體。
公用方法 CategoryResourceAttribute(String, Type, String) 使用指定的分類名稱索引鍵、型別和資源名稱,初始化 CategoryResourceAttribute 類別的新執行個體。

回頁首

屬性

  名稱 描述
公用屬性 Category 取得屬性 (Property) 分類的名稱或與這個屬性 (Attribute) 所套用的事件。 (繼承自 CategoryAttribute)。
公用屬性 DisplayNameKey 取得分類名稱資源項目的索引鍵。
公用屬性 ResourceName 取得資源的根名稱。
公用屬性 Type 取得型別,其識別內含資源的組件。
公用屬性 TypeId 在衍生類別中實作時,取得這個 Attribute 的唯一識別項。 (繼承自 Attribute)。

回頁首

方法

  名稱 描述
公用方法 Equals 傳回指定的物件值是否等於目前的 CategoryAttribute。 (繼承自 CategoryAttribute)。
公用方法 GetHashCode 傳回這個屬性的雜湊碼。 (繼承自 CategoryAttribute)。
公用方法 GetType 取得目前執行個體的 Type。 (繼承自 Object)。
公用方法 IsDefaultAttribute 判斷這個屬性是否為預設值。 (繼承自 CategoryAttribute)。
公用方法 Match 在衍生類別中覆寫時,會傳回值,表示這個執行個體是否等於指定物件。 (繼承自 Attribute)。
公用方法 ToString 傳回表示目前物件的字串。 (繼承自 Object)。

回頁首

明確介面實作

  名稱 描述
明確介面實作私用方法 _Attribute.GetIDsOfNames 將一組名稱對應至一組對應的分派識別項 (Dispatch Identifier)。 (繼承自 Attribute)。
明確介面實作私用方法 _Attribute.GetTypeInfo 擷取物件的型別資訊,可以用來取得介面的型別資訊。 (繼承自 Attribute)。
明確介面實作私用方法 _Attribute.GetTypeInfoCount 擷取物件提供的型別資訊介面數目 (0 或 1)。 (繼承自 Attribute)。
明確介面實作私用方法 _Attribute.Invoke 提供物件所公開的屬性和方法的存取權。 (繼承自 Attribute)。

回頁首

備註

這個類別的 Category 屬性會傳回已當地語系化為目前的文化特性的分類字串資源。 如果當地語系化字串是 null,則 Category 屬性會傳回 DisplayNameKey 屬性的值。

當您設計 Domain-Specific Language (DSL) 時,產生的程式碼會將這個屬性對應於在 DSL 定義中的網域屬性的個別屬性。

執行緒安全

這個類型的任何 Public static (在 Visual Basic 中為 Shared) 成員都是安全執行緒。不保證任何執行個體成員是安全執行緒。

請參閱

參考

Microsoft.VisualStudio.Modeling.Design 命名空間

DescriptionResourceAttribute

DisplayNameResourceAttribute

DescriptionAttribute

ResourceManager