| title | ShowByDefault element (Visual Studio Templates) | ||
|---|---|---|---|
| description | Learn about the ShowByDefault element and how, when set to false, it specifies that the template will only be displayed under the specified TemplateGroupID. | ||
| ms.date | 11/04/2016 | ||
| ms.subservice | general-ide | ||
| ms.topic | reference | ||
| f1_keywords | |||
| helpviewer_keywords |
|
||
| author | tinaschrepfer | ||
| ms.author | tinali |
If false, specifies that the template will only be displayed under the specified TemplateGroupID.
<VSTemplate> <TemplateData> <ShowByDefault>
<ShowByDefault> true/false </ShowByDefault>
The following sections describe attributes, child elements, and parent elements.
None.
None.
| Element | Description |
|---|---|
| TemplateData | Categorizes the template and defines how it displays in either the New Project or the Add New Item dialog box. |
A text value is required.
The text must be either true or false. If true, specifies that the template will be displayed for all project types. If false, the template will only be displayed under the specified TemplateGroupID.
ShowByDefault is an optional element. The default value is true.
The following example illustrates the metadata for a Visual C# template.
<VSTemplate Type="Project" Version="3.0.0"
xmlns="http://schemas.microsoft.com/developer/vstemplate/2005">
<TemplateData>
<Name>My template</Name>
<Description>A basic template</Description>
<Icon>TemplateIcon.ico</Icon>
<ProjectType>CSharp</ProjectType>
<ShowByDefault>false</ShowByDefault>
</TemplateData>
<TemplateContent>
<Project File="MyTemplate.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>