SPMobileListContents 类
指定呈现移动页或窗体,而不是主页的主要内容区域时使用的 <RenderingTemplate> ID。
继承层次结构
System.Object
System.Web.UI.Control
System.Web.UI.WebControls.WebControl
Microsoft.SharePoint.Mobile.WebControls.SPMobileComponent
Microsoft.SharePoint.Mobile.WebControls.SPMobileTemplateSelector
Microsoft.SharePoint.Mobile.WebControls.SPMobileListTemplateSelector
Microsoft.SharePoint.Mobile.WebControls.SPMobileListContents
命名空间: Microsoft.SharePoint.Mobile.WebControls
程序集: Microsoft.SharePoint(位于 Microsoft.SharePoint.dll 中)
语法
声明
<AspNetHostingPermissionAttribute(SecurityAction.LinkDemand, Level := AspNetHostingPermissionLevel.Minimal)> _
<AspNetHostingPermissionAttribute(SecurityAction.InheritanceDemand, Level := AspNetHostingPermissionLevel.Minimal)> _
Public NotInheritable Class SPMobileListContents _
Inherits SPMobileListTemplateSelector
用法
Dim instance As SPMobileListContents
[AspNetHostingPermissionAttribute(SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
[AspNetHostingPermissionAttribute(SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
public sealed class SPMobileListContents : SPMobileListTemplateSelector
备注
For an overview of the role of this class in the page rendering system for mobile devices, see Mobile Page Rendering System.
不要在代码中调用SPMobileListContents 。记录提供呈现进一步了解如何移动网页和如何自定义呈现方式。
<RenderingTemplate> ID 采用以下形式。
IntendedListUse_ListTemplateID_PageType_Contents
The placeholders IntendedListUse, ListTemplateID, and PageType are defined in Mobile Page Rendering System.
"内容"指示该 <RenderingTemplate> 应应用于页上的主要内容区域部分。
因此,移动网站上的通知列表视图页的SPMobileListContents对象是以下。
Mobile_104_View_Contents
此外,可能是以下。
Mobile_Announcements_View_Contents
以下示例摘自MobileDefaultTemplates.ascx文件 (在%ProgramFiles%\Common Files\Microsoft Shared\web server extensions\15\TEMPLATE\CONTROLTEMPLATES) 显示控件的主要内容区域呈现视图的页面类型时的标记。请注意仅的事件列表类型的特定模板。所有其他列表类型使用 Mobile_Default_View_Contents <RenderingTemplate>。
<SharePoint:RenderingTemplate RunAt="Server" id="MobileViewContents">
<Template>
<SPMobile:SPMobileListContents RunAt="Server" />
</Template>
</SharePoint:RenderingTemplate>
<SharePoint:RenderingTemplate RunAt="Server" id="Mobile_Default_View_Contents">
<Template>
<SPMobile:SPMobileControlContainer RunAt="Server">
<SPMobile:SPMobileComponent RunAt="Server" TemplateName="MobileViewPicker" />
<SPMobile:SPMobileComponent RunAt="Server" TemplateName="MobileDefaultSeparator" />
</SPMobile:SPMobileControlContainer>
<SPMobile:SPMobileListItemIterator RunAt="Server" ListItemSeparatorTemplateName="MobileListItemSeparator" />
<SPMobile:SPMobileLabel RunAt="Server" Text="" Weightless="true" />
</Template>
</SharePoint:RenderingTemplate>
<SharePoint:RenderingTemplate RunAt="Server" id="Mobile_Events_View_Contents">
<Template>
<SPMobile:SPMobileControlContainer RunAt="Server">
<SPMobile:SPMobileComponent RunAt="Server" TemplateName="MobileViewPicker" />
<SPMobile:SPMobileComponent RunAt="Server" TemplateName="MobileDefaultSeparator" />
</SPMobile:SPMobileControlContainer>
<SPMobile:SPMobileEventsListItemIterator RunAt="Server" ListItemSeparatorTemplateName="MobileListItemSeparator" />
<SPMobile:SPMobileLabel RunAt="Server" Text="" Weightless="true" />
</Template>
</SharePoint:RenderingTemplate>
<SharePoint:RenderingTemplate RunAt="Server" id="MobileThumbnailViewContents">
<Template>
<SPMobile:SPMobileControlContainer RunAt="Server">
<SPMobile:SPMobileComponent RunAt="Server" TemplateName="MobileViewPicker" />
<SPMobile:SPMobileComponent RunAt="Server" TemplateName="MobileDefaultSeparator" />
</SPMobile:SPMobileControlContainer>
<SPMobile:SPMobileThumbnailViewListItemIterator RunAt="Server" />
<SPMobile:SPMobileLabel RunAt="Server" Text="" />
</Template>
</SharePoint:RenderingTemplate>
<SharePoint:RenderingTemplate RunAt="Server" id="MobileSimpleViewContents">
<Template>
<SPMobile:SPMobileComponent RunAt="Server" TemplateName="MobileViewContents" />
</Template>
</SharePoint:RenderingTemplate>
不会更改MobileDefaultTemplates.ascx或GbwMobileDefaultTemplates.ascx。(而非主页或自定义页面) 的页面类型和列表类型的任何组合,尚不包含 <RenderingTemplate> MobileDefaultTemplates.ascx或GbwMobileDefaultTemplates.ascx中定义,您可以重写 Mobile_Default_PageType_Contents <RenderingTemplate> 使用以下步骤。(在主页上的主要内容区域呈现,请参阅SPMobileWebContents。主要内容区域上自定义页面类型的呈现,请参阅SPMobilePageContents。)
Create a custom .ascx file in the ...\CONTROLTEMPLATES folder that contains a <RenderingTemplate> with the name Mobile_ListTemplateID_PageType_Contents. Specify the Type or Name of a <ListTemplate> in place of ListTemplateID. Also specify a particular PageType. The latter must be one of the following: "DeletePage", "DispForm", "EditForm", "NewForm", or "View". Your custom <RenderingTemplate> then calls a combination of controls different from those used by Mobile_Default_PageType_Contents to render the main content area. (Otherwise the customization would be pointless.)
运行时自动为首选项设置为您的自定义 <RenderingTemplate> 通过 Mobile_Default_PageType_Contents <RenderingTemplate> MobileDefaultTemplates.ascx或GbwMobileDefaultTemplates.ascx中提供了。
For more about customizing Web page main content areas for built-in SharePoint Foundation page types other than home pages, see Walkthrough: Customizing a Mobile List View Page.
线程安全性
该类型的任何公共 静态 (已共享 在 Visual Basic 中) 成员都是线程安全的。不保证任何实例成员都是线程安全的。
另请参阅
引用
Microsoft.SharePoint.Mobile.WebControls 命名空间
SPMoblePageContents