NumberOfParentCategoriesToRollUp 元素(Visual Studio 模板)

指定将在“新建项目”对话框中显示模板的父类别数。

<VSTemplate><TemplateData><NumberOfParentCategoriesToRollUp>

语法

<NumberOfParentCategoriesToRollUp>
1
</NumberOfParentCategoriesToRollUp>

特性和元素

下列各节描述了特性、子元素和父元素。

特性

无。

子元素

无。

父元素

元素 描述
TemplateData 将此模板分类并定义此模板在 “新建项目”“添加新项” 对话框中的显示方式。

文本值

需要一个 integer 值。

此值指定将在“新建项目”对话框中显示模板的父类别数。

备注

NumberOfParentCategoriesToRollUp 是可选元素。

示例

此示例演示 Visual C# Windows 应用程序的元数据。 如果具有此元数据的模板放置在顶级 Visual C# 节点下方的两个文件夹级别,该模板将显示在“新建项目”对话框中的顶层节点中。 NumberOfParentCategoriesToRollUp如果未设置,则模板仅显示在其物理位置的节点中。

<VSTemplate Type="Project" Version="3.0.0"
    xmlns="http://schemas.microsoft.com/developer/vstemplate/2005">
    <TemplateData>
        <Name>My template</Name>
        <Description>A basic starter kit</Description>
        <Icon>TemplateIcon.ico</Icon>
        <ProjectType>CSharp</ProjectType>
        <NumberOfParentCategoriesToRollUp>2</NumberOfParentCategoriesToRollUp>
    </TemplateData>
    <TemplateContent>
        <Project File="MyStarterKit.csproj">
            <ProjectItem>Form1.cs<ProjectItem>
            <ProjectItem>Form1.Designer.cs</ProjectItem>
            <ProjectItem>Program.cs</ProjectItem>
            <ProjectItem>Properties\AssemblyInfo.cs</ProjectItem>
            <ProjectItem>Properties\Resources.resx</ProjectItem>
            <ProjectItem>Properties\Resources.Designer.cs</ProjectItem>
            <ProjectItem>Properties\Settings.settings</ProjectItem>
            <ProjectItem>Properties\Settings.Designer.cs</ProjectItem>
        </Project>
    </TemplateContent>
</VSTemplate>

另请参阅