SPMobileListViewIterator.DefaultTemplateName 属性

获取有关的移动视图的列表的默认模板的名称。

命名空间:  Microsoft.SharePoint.Mobile.WebControls
程序集:  Microsoft.SharePoint(位于 Microsoft.SharePoint.dll 中)

语法

声明
Public Overrides ReadOnly Property DefaultTemplateName As String
    Get
用法
Dim instance As SPMobileListViewIterator
Dim value As String

value = instance.DefaultTemplateName
public override string DefaultTemplateName { get; }

属性值

类型:System.String
有关的当前列表的移动视图的列表的默认模板的名称。

备注

此属性返回空引用(无 在 Visual Basic 中)如果Format的值不是List。否则,此属性始终返回"MobileListViewIterator"。这是文件MobileDefaultTemplates.ascx或GbwMobileDefaultTemplates.ascx,它位于%ProgramFiles%\Common Files\Microsoft Shared\web server extensions\15\TEMPLATE\CONTROLTEMPLATES 中的 <RenderingTemplate> 元素的 ID 属性的值。

您必须修改MobileDefaultTemplates.ascx或GbwMobileDefaultTemplates.ascx。若要自定义此控件的呈现,请在...\CONTROLTEMPLATES文件夹中的新 *.ascx 文件创建另一个 <RenderingTemplate> 元素。为新的 <RenderingTemplate> 元素提供描述性但可能是唯一的 ID 值。例如,您无法将您的公司名称添加到末尾的 ID,例如"MobileListViewIteratorMyCompanyInc"。从SPMobileComponent,(作为SPMobileListViewIterator同一个父) 派生新类,然后重写其DefaultTemplateName属性,以便它返回您自定义的 id。

另请参阅

引用

SPMobileListViewIterator 类

SPMobileListViewIterator 成员

Microsoft.SharePoint.Mobile.WebControls 命名空间