Click or drag to resize
KaxMenuItemTemplate Property
Gets or sets the template for displaying the items in KaxMenu.

Namespace: Kettic.AspNet.Controls
Assembly: Kettic.AspNet.Controls (in Kettic.AspNet.Controls.dll) Version: 2014.4.1129.0 (2014.04.1129.0)
Syntax
[PersistenceModeAttribute(PersistenceMode.InnerProperty)]
public ITemplate ItemTemplate { get; set; }

Property Value

Type: ITemplate

An object which implements the ITemplate interface. The default value is a null reference (Nothing in Visual Basic), which indicates that this property is not set.

The ItemTemplate property sets a template that will be used for all menu items.

To specify unique display for individual items use the ItemTemplate property of the KaxMenuItem class.

Examples

The following example demonstrates how to use the ItemTemplate property to add a CheckBox for each item.

ASPX:

<kettic:KaxMenu runat="server" ID="KaxMenu1">

<ItemTemplate>

<asp:CheckBox runat="server" ID="CheckBox"></asp:CheckBox>
<asp:Label runat="server" ID="Label1"

Text='<%# DataBinder.Eval(Container, "Text") %>'

></asp:Label>

</ItemTemplate>

<Items>

<kettic:KaxMenuItem Text="News" />

<kettic:KaxMenuItem Text="Sports" />

<kettic:KaxMenuItem Text="Games" />

</Items>

</kettic:KaxMenu>

See Also