NewItemFactory.GetDisplayName 方法

取得所指定 Type 的顯示名稱,而該顯示名稱可以加入至集合編輯器或子屬性編輯器。

命名空間:  Microsoft.Windows.Design.PropertyEditing
組件:  Microsoft.Windows.Design.Interaction (在 Microsoft.Windows.Design.Interaction.dll 中)

語法

'宣告
Public Overridable Function GetDisplayName ( _
    type As Type _
) As String
public virtual string GetDisplayName(
    Type type
)
public:
virtual String^ GetDisplayName(
    Type^ type
)
abstract GetDisplayName : 
        type:Type -> string 
override GetDisplayName : 
        type:Type -> string 
public function GetDisplayName(
    type : Type
) : String

參數

  • type
    型別:System.Type
    要為其取得顯示名稱的型別。

傳回值

型別:System.String
type 的顯示名稱。

例外狀況

例外狀況 條件
ArgumentNullException

type 為 nullNull 參照 (即 Visual Basic 中的 Nothing)。

備註

這個方法會傳回 [加入項目] 下拉式方塊中顯示的名稱,以識別所加入的 Type。 預設實作會傳回 Type 的簡短名稱。

.NET Framework 安全性

請參閱

參考

NewItemFactory 類別

Microsoft.Windows.Design.PropertyEditing 命名空間

其他資源

WPF 設計工具擴充性