通过


AppearanceEditorPart.Title 属性

定义

获取或设置编辑器控件的标题。

public:
 virtual property System::String ^ Title { System::String ^ get(); void set(System::String ^ value); };
public override string Title { get; set; }
member this.Title : string with get, set
Public Overrides Property Title As String

属性值

用作控件标题的字符串。 默认值是 Web 部件控件集提供的计算控件名称。

示例

下面的代码示例演示了该 Title 属性的使用。 有关运行示例所需的完整代码,请参阅类概述主题的 AppearanceEditorPart “示例”部分。

代码示例演示如何在页面中声明元素时设置页面持久性格式的 <asp:appearanceeditorpart> 标题。

<asp:EditorZone ID="EditorZone1" runat="server">
  <ZoneTemplate>
    <asp:AppearanceEditorPart ID="AppearanceEditorPart1" 
      runat="server" 
      Title="Edit TextDisplayWebPart Properties" />
  </ZoneTemplate>      
</asp:EditorZone>
<asp:EditorZone ID="EditorZone1" runat="server">
  <ZoneTemplate>
    <asp:AppearanceEditorPart ID="AppearanceEditorPart1" 
      runat="server"  
      Title="Edit TextDisplayWebPart Properties" />
  </ZoneTemplate>      
</asp:EditorZone>

在浏览器中加载页面时,可以在“显示模式”下拉列表控件中选择“编辑模式”以切换到编辑模式。 可以单击控件标题栏中的 TextDisplayWebPart 谓词菜单(向下箭头),然后单击“ 编辑” 以编辑控件。 编辑用户界面(UI)可见时,可以看到 AppearanceEditorPart 控件的自定义标题。

注解

当控件在编辑模式下可见时,属性值 Title 将显示在控件的 AppearanceEditorPart 标题栏中。 在页面中声明控件时,可以为属性设置值 Title 。 如果未提供标题的值,则使用区域性特定的默认值来描述此控件允许用户编辑的属性类型。

适用于

另请参阅