SPMobileComponent.Template 属性

获取或设置SPMobileComponent对象该控件呈现的模板。

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

语法

声明
Public Overridable Property Template As ITemplate
    Get
    Set
用法
Dim instance As SPMobileComponent
Dim value As ITemplate

value = instance.Template

instance.Template = value
public virtual ITemplate Template { get; set; }

属性值

类型:System.Web.UI.ITemplate
控制SPMobileComponent对象的呈现ITemplate 。默认值是由TemplateName命名ITemplate对象。

备注

在默认实现中,如果Template未显式设置,但TemplateName不空引用(无 在 Visual Basic 中), Template返回名为TemplateNameRenderingTemplate对象。

设置TemplateName (具有其默认实现) 具有副作用的设置Template可返回由TemplateName命名RenderingTemplate对象。

但是,设置Template直接执行设置TemplateName到已分配给TemplateRenderingTemplate模板的名称。因此,当您需要设置RenderingTemplate对象时使用TemplateName可以减少不一致的值的危险。

如果Template和TemplateName的值不一致, Template确定用于呈现该组件的RenderingTemplate对象。

另请参阅

引用

SPMobileComponent 类

SPMobileComponent 成员

Microsoft.SharePoint.Mobile.WebControls 命名空间