Specifies whether the or not the Select Master Page checkbox is enabled on the Add New Item dialog box.
<VSTemplate>
<TemplateData>
<SupportsMasterPage>
<SupportsMasterPage> true/false </SupportsMasterPage>
特性和元素
The following sections describe attribute, child elements, and parent elements.
特性
None.
子元素
None.
父元素
Element |
Description |
---|---|
Specifies data that categorizes the template, and defines how it displays in the New Project or New Item dialog box. |
文本值
A text value is required.
The text must be either true or false, indicating whether or not the Select Master Page checkbox is enabled on the Add New Item dialog box.
备注
SupportsMasterPage is an optional element. The default value is false.
The SupportsMasterPage element is only available for Web item templates.
示例
The following example illustrates the metadata for a Web project that includes support for a master page.
<VSTemplate Version="3.0.0" Type="Project"
xmlns="https://schemas.microsoft.com/developer/vstemplate/2005">>
<TemplateData>
<Name>MyWebProjecStarterKit</Name>
<Description>A simple Web template</Description>
<Icon>icon.ico</Icon>
<ProjectType>Web</ProjectType>
<ProjectSubType>CSharp</ProjectSubType>
<DefaultName>WebSite</DefaultName>
<SupportsMasterPage>true</SupportsMasterPage>
</TemplateData>
<TemplateContent>
<Project File="WebApplication.webproj">
<ProjectItem>icon.ico</ProjectItem>
<ProjectItem OpenInEditor="true">Default.aspx</ProjectItem>
<ProjectItem>Default.aspx.cs</ProjectItem>
</Project>
</TemplateContent>
</VSTemplate>