EnableEditOfLocationField Element (Visual Studio Templates)

Specifies whether the user can specify where new projects are saved.

<VSTemplate>
  <TemplateData>
    <EnableEditOfLocationField>

<EnableEditOfLocationField> true/false </EnableEditOfLocationField>

Attributes and Elements

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

Attributes

None

Child Elements

None

Parent Elements

Element

Description

TemplateData

Required element.

Categorizes the template and defines how it appears in either the New Project dialog box or the Add New Item dialog box.

Text Value

The value of this element must be either true or false to indicate whether the user can edit the value in the Location box in the New Project dialog box.

Remarks

The EnableEditOfLocationField element is optional. By default, its value is true, which allows the user to edit the value in the Location box in the New Project dialog box.

In the New Project dialog box, the Location text box specifies the directory where a new project is saved. For more information, see New Project Dialog Box.

Example

The following example illustrates the metadata for a Windows application that is written in Visual C#.

<VSTemplate Type="Project" Version="2.0.0"
    xmlns="https://schemas.microsoft.com/developer/vstemplate/2005">
    <TemplateData>
        <Name>My template</Name>
        <Description>A basic starter kit</Description>
        <Icon>TemplateIcon.ico</Icon>
        <ProjectType>CSharp</ProjectType>
        <EnableEditOfLocationField>false</EnableEditOfLocationField>
        <EnableLocationBrowseButton>false</EnableLocationBrowseButton>
    </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>

See Also

Reference

Visual Studio Template Schema Reference

Other Resources

Visual Studio Templates