Skip to main content
A newer version of this page is available. .

TileControl.ItemClick Event

Fires when an end-user clicks a TileItem within the TileControl.

Namespace: DevExpress.XtraEditors

Assembly: DevExpress.XtraEditors.v19.1.dll

Declaration

[DXCategory("Behavior")]
public event TileItemClickEventHandler ItemClick

Event Data

The ItemClick event's data class is TileItemEventArgs. The following properties provide information specific to this event:

Property Description
Item Gets or sets a TileItem that caused firing a related event.

Remarks

Handle the ItemClick event to respond to an end-user clicking any item within the current TileControl object. You can also use handle the TileItem.ItemClick event to respond to clicking an individual TileItem. This event can be raised in code via the TileItem.PerformItemClick method. The TileItem.ItemClick event is fired before the ItemClick event.

The following sample illustrates how to check and un-check Tiles on left mouse button clicks.


tileControl1.ItemCheckMode = TileItemCheckMode.Multiple;
 tileControl1.ItemClick += tileControl1_ItemClick;

private void tileControl1_ItemClick(object sender, TileItemEventArgs e) {
    e.Item.Checked = !e.Item.Checked;
}

The ItemClick event comes after the TileControl.ItemPress event when the left mouse button is released. If an item is being dragged, the ItemClick event is never fired.

Right-clicking a TileItem fires the TileItem.RightItemClick and TileControl.RightItemClick events. Notice that this does not work for check items (see the TileControl.ItemCheckMode property).

You can also respond to Tiles double-clicking by handling the TileControl.ItemDoubleClick event.

See Also