WebPart.DisplayTitle 属性

定义

获取一个字符串,其中包含在 WebPart 控件实例的标题栏中实际显示的完整标题文本。Gets a string that contains the full title text actually displayed in the title bar of a WebPart control instance.

public:
 property System::String ^ DisplayTitle { System::String ^ get(); };
[System.ComponentModel.Browsable(false)]
public string DisplayTitle { get; }
member this.DisplayTitle : string
Public ReadOnly Property DisplayTitle As String

属性值

一个表示控件的完整显示标题的字符串。A string that represents the complete, displayed title of the control. 默认值为空字符串 ("")。The default value is an empty string ("").

属性

注解

DisplayTitle 属性返回 Title 属性的当前值,或者,如果该控件没有标题,则返回一个计算的值。The DisplayTitle property returns either the current value of the Title property or, if the control has no title, a calculated value. 计算得出的值包括无标题控件的可本地化资源字符串,此外(如果区域中有多个控件)基于区域中控件的索引。The calculated value consists of a localizable resource string for untitled controls, plus (if there are multiple controls within the zone) a number based on the index of the control within the zone.

对于 Subtitle 属性已被重写以返回用作副标题的字符串值的自定义 WebPart 控件,DisplayTitle 属性与副标题连接以生成完整的标题。For custom WebPart controls where the Subtitle property has been overridden to return a string value to use as a subtitle, the DisplayTitle property is concatenated with the subtitle to produce a complete title.

当用户将鼠标指针放在控件的标题栏上方时,DisplayTitle 属性值也作为工具提示的一部分出现。The DisplayTitle property value also serves as part of a ToolTip that appears when a user positions the mouse pointer over the title bar of a control. 完整的工具提示包含 DisplayTitle 值,后跟连字符,后跟控件的 Description 属性的值。The full ToolTip consists of the DisplayTitle value, followed by a hyphen, followed by the value of the control's Description property.

适用于

另请参阅