WebPartZoneBase.MenuLabelStyle Properti
Definisi
Penting
Beberapa informasi terkait produk prarilis yang dapat diubah secara signifikan sebelum dirilis. Microsoft tidak memberikan jaminan, tersirat maupun tersurat, sehubungan dengan informasi yang diberikan di sini.
Mendapatkan informasi gaya untuk label menu drop-down kata kerja yang muncul di bilah judul setiap WebPart kontrol di zona.
public:
property System::Web::UI::WebControls::Style ^ MenuLabelStyle { System::Web::UI::WebControls::Style ^ get(); };
[System.Web.UI.PersistenceMode(System.Web.UI.PersistenceMode.InnerProperty)]
public System.Web.UI.WebControls.Style MenuLabelStyle { get; }
[<System.Web.UI.PersistenceMode(System.Web.UI.PersistenceMode.InnerProperty)>]
member this.MenuLabelStyle : System.Web.UI.WebControls.Style
Public ReadOnly Property MenuLabelStyle As Style
Nilai Properti
Style Yang berisi informasi gaya untuk label menu kata kerja.
- Atribut
Contoh
Contoh kode berikut menunjukkan penggunaan MenuLabelStyle deklaratif properti pada WebPartZone kontrol. Untuk contoh kode lengkap, termasuk file sumber code-behind dan halaman .aspx yang berisi zona dalam kode ini, lihat WebPartZoneBase gambaran umum kelas.
Perhatikan bahwa MenuLabelStyle properti memiliki nilai yang ditetapkan untuknya dalam markup deklaratif. Nilai ini berdampak WebPartZone2pada . Setelah Anda memuat halaman ke browser, alihkan halaman ke mode edit, dan perhatikan bahwa warna untuk label menu kata kerja adalah WebPartZone2 warna yang ditetapkan untuknya dalam markup deklaratif.
<asp:WebPartZone
ID="WebPartZone2"
Runat="server"
DragHighlightColor="#00ff00"
AllowLayoutChange="true"
EmptyZoneText="Add WebParts to this empty Zone."
BorderWidth="2"
BorderColor="DarkBlue"
BorderStyle="Dashed"
MenuLabelText="Verbs Menu"
MenuPopupImageUrl="label.gif" >
<VerbStyle Font-Italic="true" />
<MenuLabelStyle BackColor="Lime" BorderWidth="1" />
<MenuLabelHoverStyle Font-Bold="true" />
<MenuVerbHoverStyle BackColor="LightGrey" />
<MenuVerbStyle Font-Italic="true" />
<ZoneTemplate>
<asp:Label ID="Label1" Runat="server" Title="Date" />
</ZoneTemplate>
</asp:WebPartZone>
<asp:WebPartZone
ID="WebPartZone2"
Runat="server"
DragHighlightColor="#00ff00"
AllowLayoutChange="true"
EmptyZoneText="Add WebParts to this empty Zone."
BorderWidth="2"
BorderColor="DarkBlue"
BorderStyle="Dashed"
MenuLabelText="Verbs Menu"
MenuPopupImageUrl="label.gif" >
<VerbStyle Font-Italic="true" />
<MenuLabelStyle BackColor="Lime" BorderWidth="1" />
<MenuLabelHoverStyle Font-Bold="true" />
<MenuVerbHoverStyle BackColor="LightGrey" />
<MenuVerbStyle Font-Italic="true" />
<ZoneTemplate>
<asp:Label ID="Label1" Runat="server" Title="Date" />
</ZoneTemplate>
</asp:WebPartZone>
Keterangan
Properti MenuLabelStyle memengaruhi gaya label pada menu kata kerja setiap kontrol Bagian Web di zona, terlepas dari apakah label berisi gambar, teks, atau keduanya.