FontInfo.Names 属性

定义

获取或设置字体名称的排序数组。Gets or sets an ordered array of font names.

public:
 property cli::array <System::String ^> ^ Names { cli::array <System::String ^> ^ get(); void set(cli::array <System::String ^> ^ value); };
[System.ComponentModel.TypeConverter(typeof(System.Web.UI.WebControls.FontNamesConverter))]
public string[] Names { get; set; }
member this.Names : string[] with get, set
Public Property Names As String()

属性值

String[]

字体名称的排序数组。An ordered array of font names.

属性

注解

使用属性来指定或确定的字体名称FontInfo的有序数组。 NamesUse the Names property to specify or determine an ordered array of font names for a FontInfo. Names属性通常用于存储可用字体名称的列表。The Names property is commonly used to store a list of available font names.

备注

设置Names属性时Name , 属性会自动更新为Names属性中的第一项。When you set the Names property, the Name property is automatically updated with the first item in the Names property. 如果设置了Name属性Names , 则会使用Name包含属性值的单个元素数组自动更新属性。If you set the Name property, the Names property is automatically updated with a single element array containing the value of the Name property.

若要FontInfo Names使用数组指定的字体名称, 请将数组中的第一个元素设置为要使用的字体名称。To specify the font name for the FontInfo using the Names array, set the first element in the array to the font name you want to use. 因为当设置Names属性时, Name属性会自动更新, 所以需要对数组进行操作以重新排列数组中项的顺序, 而不是直接设置属性。 Names NameSince the Names property is automatically updated when the Name property is set, you need to manipulate the Names array to rearrange the order of the items in the array instead of setting the Name property directly.

此属性的值存储在视图状态中。The value of this property is stored in view state.

适用于

另请参阅