Elemen LocationField (templat proyek Visual Studio)
Menentukan apakah kotak teks Lokasi dalam kotak dialog Proyek Baru diaktifkan, dinonaktifkan, atau disembunyikan untuk templat proyek.
<VsTemplate><TemplateData><LocationField>
Sintaks
<LocationField> Enabled/Disabled/Hidden </LocationField>
Atribut dan elemen
Bagian berikut menjelaskan atribut, elemen turunan, dan elemen induk.
Atribut
Tidak ada.
Elemen anak
Tidak ada.
Elemen induk
Elemen | Deskripsi |
---|---|
TemplateData | Elemen yang diperlukan. Mengategorikan templat dan menentukan bagaimana templat ditampilkan di Proyek Baru. |
Nilai teks
Nilai teks diperlukan.
Nilai teks yang valid adalah:
Enabled
, yang menentukan bahwa kotak lokasi kotak dialog Proyek Baru diaktifkan.Disabled
, yang menentukan bahwa kotak lokasi dari kotak dialog Proyek Baru dinonaktifkan.Hidden
, yang menentukan bahwa kotak lokasi kotak dialog Proyek Baru disembunyikan.
Keterangan
Nilai defaultnya adalah Enabled
.
Kotak teks Lokasi dalam kotak dialog Proyek Baru memungkinkan pengguna mengubah direktori default tempat proyek baru disimpan.
Nilai yang ditentukan dalam Location
elemen hanya dihormati oleh kotak dialog jika sistem proyek yang mendasar mendukungnya.
Contoh
Contoh berikut mengilustrasikan metadata untuk templat Visual C#.
<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>
<LocationField>Disabled</LocationField>
</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>