Share via


EnableEditOfLocationField 項目 (Visual Studio 範本)

指定使用者是否可以編輯位置欄位。

<EnableEditOfLocationField> true/false </EnableEditOfLocationField>

屬性和項目

下列章節會說明屬性、子項目和父項目。

屬性

None

子項目

None

父項目

元素

描述

TemplateData

必要項目。

為範本分類,並定義在 [新增專案] 或 [加入新項目] 對話方塊中範本的顯示方式。

文字值

需要文字值。

文字必須是 true 或 false,指示使用者是否可以編輯 [新增專案] 對話方塊上的 [位置] 文字方塊。

備註

EnableEditOfLocationField 是選擇性項目。 預設值是true,它允許使用者編輯 [位置]文字方塊中的值,此文字方塊位於 [新增專案] 對話方塊中。

[新增專案] 對話方塊中的 [位置] 文字方塊指定用以儲存新專案的目錄。

範例

下列範例說明 Visual C# Windows 應用程式的中繼資料。

<VSTemplate Type="Project" Version="3.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>

在這裡插入內容。

請參閱

參考

Visual Studio 範本結構描述參考

概念

Visual Studio 範本簡介