SPMobileWebNavigation 类
指定呈现移动主页的页脚区域时使用的 <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.SPMobileWebTemplateSelector
Microsoft.SharePoint.Mobile.WebControls.SPMobileWebNavigation
命名空间: Microsoft.SharePoint.Mobile.WebControls
程序集: Microsoft.SharePoint(位于 Microsoft.SharePoint.dll 中)
语法
声明
<AspNetHostingPermissionAttribute(SecurityAction.LinkDemand, Level := AspNetHostingPermissionLevel.Minimal)> _
<AspNetHostingPermissionAttribute(SecurityAction.InheritanceDemand, Level := AspNetHostingPermissionLevel.Minimal)> _
Public NotInheritable Class SPMobileWebNavigation _
Inherits SPMobileWebTemplateSelector
用法
Dim instance As SPMobileWebNavigation
[AspNetHostingPermissionAttribute(SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
[AspNetHostingPermissionAttribute(SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
public sealed class SPMobileWebNavigation : SPMobileWebTemplateSelector
备注
For an overview of the role of this class in the page rendering system for mobile devices, see Mobile Page Rendering System.
不要在代码中调用SPMobileWebNavigation 。记录提供呈现进一步了解如何移动网页和如何自定义呈现方式。
页脚区域的呈现的页面而不是主页的信息,请参阅SPMobileListNavigation。
<RenderingTemplate> ID 采用以下形式。
IntendedPageUse_WebSiteType_PageType_Navigation
The placeholders IntendedPageUse and WebSiteType are defined as in Mobile Page Rendering System,
PageType是页面,例如主页或 NewForm 的类型。对于所有实际情况,在SharePoint Foundation,此 ID 的部件始终是主页。
"导航"指示该 <RenderingTemplate> 适用于页上的页脚部分。
以下示例摘自MobileDefaultTemplates.ascx文件 (在%ProgramFiles%\Common Files\Microsoft Shared\web server extensions\15\TEMPLATE\CONTROLTEMPLATES)) 显示SPMobileWebNavigation由"MobileHomePageNavigation"呈现模板。
<SharePoint:RenderingTemplate RunAt="Server" ID="MobileHomePageNavigation">
<Template>
<SPMobile:SPMobileWebNavigation RunAt="Server" />
</Template>
</SharePoint:RenderingTemplate>
以下示例摘自同一文件显示可能会调用,接下来,由SPMobileWebNavigation对象的内置呈现模板之一:
<SharePoint:RenderingTemplate RunAt="Server" id="Mobile_Default_HomePage_Navigation">
<Template>
<SPMobile:SPMobileHomePageNavigation RunAt="Server"
Text="<%$Resources:wss, mobile_navigation_home_text%>"
AppendWebTitleToText="True" AccessKey="0" />
<SharePoint:DelegateControl RunAt="server" ControlId="MobileSiteNavigationLink1" />
<SharePoint:DelegateControl RunAt="server"
ControlId="MobileSiteNavigationLink2" />
<SPMobile:SPMobileLogoutPageNavigation RunAt="Server"
Text="<%$Resources:wss, personalactions_logout%>" />
</Template>
</SharePoint:RenderingTemplate>
如果特定IntendedPageUse和WebSiteType找不到具有匹配的名称的模板,则使用IntendedPageUse_Default_HomePage_Navigation <RenderingTemplate>。
不会更改MobileDefaultTemplates.ascx或GbwMobileDefaultTemplates.ascx。对于任何网站类型,STS 例如,尚不包含 <RenderingTemplate> MobileDefaultTemplates.ascx或GbwMobileDefaultTemplates.ascx中定义,您可以重写IntendedPageUse_Default_HomePage_Navigation <RenderingTemplate> 使用以下方法。
Create a custom .ascx file in the ...\CONTROLTEMPLATES folder that contains a <RenderingTemplate> with the name IntendedPageUse_WebSiteType_HomePage_Contents. Specify the name of a <Template>, such as STS (or the ID of a <Template> for a custom site definition), in place of WebSiteType. Specify an intended page use, such as WebPartMobile for IntendedPageUse. Your custom <RenderingTemplate> then calls a combination of controls different from those used by IntendedPageUse_Default_HomePage_Navigation to render the footer. (Otherwise the customization would be pointless.)
运行时自动为首选项设置为您的自定义 <RenderingTemplate> 通过IntendedPageUse_Default_HomePage_Navigation <RenderingTemplate> MobileDefaultTemplates.ascx或GbwMobileDefaultTemplates.ascx中提供了。
For more about customizing Web page footers, see Walkthrough: Customizing the Mobile Home Page.
线程安全性
该类型的任何公共 静态 (已共享 在 Visual Basic 中) 成员都是线程安全的。不保证任何实例成员都是线程安全的。
另请参阅
引用
Microsoft.SharePoint.Mobile.WebControls 命名空间