語言

DisplayName<TValue> 類別

定義

顯示指定欄位的顯示名稱,讀取 DisplayAttribute 或 DisplayNameAttribute 讀取(若存在)或回退至屬性名稱。

public sealed class DisplayName<TValue> : Microsoft.AspNetCore.Components.IComponent
type DisplayName<'Value> = class
    interface IComponent
Public NotInheritable Class DisplayName(Of TValue)
Implements IComponent

類型參數

TValue

欄位的類型。

繼承
DisplayName<TValue>
實作

備註

解析後的名稱會以每個文化快取,涵蓋整個流程的生命週期。 在 Web Assembly 用戶端切換文化時,建議重新載入頁面以釋放未使用的文化資料。

建構函式

名稱 Description
DisplayName<TValue>()

顯示指定欄位的顯示名稱,讀取 DisplayAttribute 或 DisplayNameAttribute 讀取(若存在)或回退至屬性名稱。

屬性

名稱 Description
For

指定顯示名稱應顯示的欄位。

明確介面實作

名稱 Description
IComponent.Attach(RenderHandle)

將元件附加於 RenderHandle.

IComponent.SetParametersAsync(ParameterView)

設定由渲染樹中元件父節點提供的參數。

適用於