共用方式為


ElementPropertyDescriptor 類別

表示 Domain-Specific Language (DSL) 模型中的網域屬性。

繼承階層架構

System.Object
  System.ComponentModel.MemberDescriptor
    System.ComponentModel.PropertyDescriptor
      Microsoft.VisualStudio.Modeling.Design.ElementPropertyDescriptor
        Microsoft.VisualStudio.Modeling.Design.TrackingPropertyDescriptor
        Microsoft.VisualStudio.Modeling.Diagrams.LabelShapeTextPropertyDescriptor
        Microsoft.VisualStudio.Modeling.DslDefinition.Design.DslDefinitionModelElementPropertyDescriptor

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

語法

'宣告
Public Class ElementPropertyDescriptor _
    Inherits PropertyDescriptor
public class ElementPropertyDescriptor : PropertyDescriptor

ElementPropertyDescriptor 類型會公開下列成員。

建構函式

  名稱 描述
公用方法 ElementPropertyDescriptor(ModelElement, DomainPropertyInfo, array<Attribute[]) 初始化 ElementPropertyDescriptor 類別的新執行個體。
公用方法 ElementPropertyDescriptor(ElementTypeDescriptor, ModelElement, DomainPropertyInfo, array<Attribute[]) 初始化 ElementPropertyDescriptor 類別的新執行個體,並指定預設值提供者。

回頁首

屬性

  名稱 描述
受保護的屬性 AttributeArray 取得或設定屬性的陣列。 (繼承自 MemberDescriptor)。
公用屬性 Attributes 取得這個成員的屬性集合。 (繼承自 MemberDescriptor)。
公用屬性 Category 取得分類,當屬性在設為 [分類] 模式的 PropertyGrid 控制項中顯示時,會在該分類中群組網域屬性。 (覆寫 MemberDescriptor.Category。)
公用屬性 ComponentType 取得這個屬性所繫結之模型項目的型別。 (覆寫 PropertyDescriptor.ComponentType。)
公用屬性 Converter 取得所描述屬性的轉換器。 (覆寫 PropertyDescriptor.Converter。)
公用屬性 Description 取得所描述屬性的描述,如 DescriptionResourceAttribute 中所指定。 (覆寫 MemberDescriptor.Description。)
公用屬性 DesignTimeOnly 取得值,表示這個成員是否只在設計階段設定,如 DesignOnlyAttribute 中所指定的。 (繼承自 MemberDescriptor)。
公用屬性 DisplayName 取得所描述屬性的顯示名稱,如 DisplayNameResourceAttribute 中所指定。 (覆寫 MemberDescriptor.DisplayName。)
公用屬性 DomainPropertyInfo 取得用來建立這個屬性描述元的屬性資訊物件。
公用屬性 IsBrowsable 取得值,表示成員是否可瀏覽,如 BrowsableAttribute 中指定的。 (繼承自 MemberDescriptor)。
公用屬性 IsInstanceBased 測試 PropertyDescriptor 是以執行個體或靜態型別為基礎。
公用屬性 IsLocalizable 取得值,表示這個屬性是否應該當地語系化,如 LocalizableAttribute 中指定的。 (繼承自 PropertyDescriptor)。
公用屬性 IsReadOnly 取得值,指出描述的屬性是否為唯讀。 (覆寫 PropertyDescriptor.IsReadOnly。)
公用屬性 ModelElement 取得用來建立這個屬性描述元的模型項目。
公用屬性 Name 取得成員的名稱。 (繼承自 MemberDescriptor)。
受保護的屬性 NameHashCode 取得成員名稱的雜湊程式碼,如 GetHashCode 中所指定的。 (繼承自 MemberDescriptor)。
公用屬性 PropertyType 取得所描述屬性的屬性型別。 (覆寫 PropertyDescriptor.PropertyType。)
公用屬性 SerializationVisibility 取得值,表示這個屬性是否應該序列化,如 DesignerSerializationVisibilityAttribute 中指定的。 (繼承自 PropertyDescriptor)。
公用屬性 SupportsChangeEvents 取得值,表示這個屬性的數值變更告知是否可能來自屬性描述項之外。 (繼承自 PropertyDescriptor)。

回頁首

方法

  名稱 描述
公用方法 AddValueChanged (覆寫 PropertyDescriptor.AddValueChanged(Object, EventHandler)。)
公用方法 CanResetValue 表示是否可重設網域屬性的值。 (覆寫 PropertyDescriptor.CanResetValue(Object)。)
公用方法靜態成員 CanSetProperty
受保護的方法 CreateAttributeCollection 使用傳遞給建構函式的屬性陣列,建立屬性的集合。 (繼承自 MemberDescriptor)。
受保護的方法 CreateInstance 建立指定型別的執行個體。 (繼承自 PropertyDescriptor)。
公用方法 Equals 比較這個與另一個物件,以檢視它們是否相等。 (繼承自 PropertyDescriptor)。
受保護的方法 FillAttributes PropertyDescriptor 的屬性加入至父類別中的指定屬性清單。 (繼承自 PropertyDescriptor)。
受保護的方法 Finalize 允許物件在記憶體回收進行回收之前,嘗試釋放資源並執行其他清除作業。 (繼承自 Object)。
公用方法 GetChildProperties() 傳回預設的 PropertyDescriptorCollection。 (繼承自 PropertyDescriptor)。
公用方法 GetChildProperties(array<Attribute[]) 使用指定的屬性陣列做為篩選條件,傳回 PropertyDescriptorCollection。 (繼承自 PropertyDescriptor)。
公用方法 GetChildProperties(Object) 傳回指定物件的 PropertyDescriptorCollection。 (繼承自 PropertyDescriptor)。
公用方法 GetChildProperties(Object, array<Attribute[]) 使用指定的屬性陣列做為篩選條件,傳回指定物件的 PropertyDescriptorCollection。 (繼承自 PropertyDescriptor)。
公用方法 GetEditor 傳回所描述之屬性的值編輯器。 (覆寫 PropertyDescriptor.GetEditor(Type)。)
公用方法靜態成員 GetElementPropertyDescriptor 根據給定的 ModelElement 和 DomainPropertyInfo,取得 ElementPropertyDescriptor。
公用方法 GetHashCode 傳回這個物件的雜湊程式碼。 (繼承自 PropertyDescriptor)。
受保護的方法 GetInvocationTarget 這個方法會傳回應該在成員的引動過程使用的物件。 (繼承自 PropertyDescriptor)。
公用方法靜態成員 GetSetValueTransactionName 傳回設定值異動之名稱的當地語系化字串。
公用方法 GetType 取得目前執行個體的 Type。 (繼承自 Object)。
受保護的方法 GetTypeFromName 使用其名稱以傳回型別。 (繼承自 PropertyDescriptor)。
公用方法 GetValue 取得網域屬性的值。 (覆寫 PropertyDescriptor.GetValue(Object)。)
受保護的方法 GetValueChangedHandler 對特定元件擷取目前的 ValueChanged 事件處理常式集 (繼承自 PropertyDescriptor)。
受保護的方法 MemberwiseClone 建立目前 Object 的淺層複本 (Shallow Copy)。 (繼承自 Object)。
受保護的方法 OnValueChanged 引發您實作的 ValueChanged 事件。 (繼承自 PropertyDescriptor)。
公用方法 RemoveValueChanged (覆寫 PropertyDescriptor.RemoveValueChanged(Object, EventHandler)。)
公用方法 ResetValue 重設網域屬性的值。 (覆寫 PropertyDescriptor.ResetValue(Object)。)
公用方法靜態成員 SetProperty 設定屬性值。通常是透過 ElementPropertyDescriptor 來設定屬性值。如果 propertyInfo 的 IsBrowsable 屬性設定為 false,而且找不到 ElementPropertyDescriptor,它會直接透過 propertyInfo 的 SetValue 方法上設定。
公用方法 SetValue 設定網域屬性的值。 (覆寫 PropertyDescriptor.SetValue(Object, Object)。)
公用方法 ShouldSerializeValue 指出是否應該序列化網域屬性的值。 (覆寫 PropertyDescriptor.ShouldSerializeValue(Object)。)
公用方法 ToString 傳回表示目前物件的字串。 (繼承自 Object)。

回頁首

備註

這個類別會提供一個模型項目的網域屬性提供動態自訂屬性資訊。

Domain-Specific Language Tools (DSL 工具) 使用這個型別表示網域的網域類別屬性模型。 型別控制屬性如何處理在網域模型的屬性方格中處理及修改所描述的屬性提供交易。

若要建立自訂的項目屬性描述項,請從這個類別繼承並覆寫一或多個成員。

執行緒安全

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

請參閱

參考

Microsoft.VisualStudio.Modeling.Design 命名空間

ElementTypeDescriptor

RolePlayerPropertyDescriptor

TrackingPropertyDescriptor

ModelElement

PropertyDescriptor