SupportsLanguageDropDown Element (Visual Studio Templates)

 

The new home for Visual Studio documentation is Visual Studio 2017 Documentation on docs.microsoft.com.

The latest version of this topic can be found at SupportsLanguageDropDown Element (Visual Studio Templates).

Specifies whether the Web item template is identical for multiple languages, and whether the Language option is enabled on the Add New Item dialog box.

<VSTemplate>
<TemplateData>
<SupportsLanguageDropDown>

<SupportsLanguageDropDown> true/false </SupportsLanguageDropDown>  

The following sections describe attribute, child elements, and parent elements.

Attributes

None.

Child Elements

None.

Parent Elements

ElementDescription
TemplateDataRequired element.

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, indicating whether or not the Language option is available from the Add New Item dialog box.

SupportsLanguageDropDown is an optional element. The default value is false.

The SupportsLanguageDropDown element is only available for Web item templates.

If the value for this element is set to true, then the item template is identical for all programming languages and the Language option is enabled in the Add New Item dialog box. This option enables you to choose the programming language of the new item that you want to create from the template.

The following example specifies to display the Language drop down option.

<VSTemplate Version="3.0.0" Type="Project"  
    xmlns="http://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>  
        <SupportsLanguageDropDown>true</SupportsLanguageDropDown>  
    </TemplateData>  
    <TemplateContent>  
        <Project File="WebApplication.webproj">  
            <ProjectItem>icon.ico</ProjectItem>  
            <ProjectItem OpenInEditor="true">Default.aspx</ProjectItem>  
            <ProjectItem>Default.aspx.cs</ProjectItem>  
        </Project>  
    </TemplateContent>  
</VSTemplate>  

Visual Studio Template Schema Reference
Creating Project and Item Templates

Show: