Back to Devexpress

TileItem.ItemClick Event

windowsforms-devexpress-dot-xtraeditors-dot-tileitem-26cf37c9.md

latest4.2 KB
Original Source

TileItem.ItemClick Event

Fires when a user clicks the current tile.

Namespace : DevExpress.XtraEditors

Assembly : DevExpress.XtraEditors.v25.2.dll

NuGet Package : DevExpress.Win.Navigation

Declaration

csharp
[DXCategory("Behavior")]
public event TileItemClickEventHandler ItemClick
vb
<DXCategory("Behavior")>
Public Event ItemClick As TileItemClickEventHandler

Event Data

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

PropertyDescription
ItemGets or sets a TileItem that caused firing a related event.

Remarks

Handle the ItemClick or TileControl.ItemClick event to respond to a click on a specific tile. The ItemClick events fire after the TileItem.ItemPress and TileControl.ItemPress events.

When a user starts to drag a tile, the ItemPress events fire. The ItemClick events do not fire in this case.

The TileItem.PerformItemClick and TileItem.PerformRightItemClick methods allow you to raise the ItemClick and RightItemClick (TileControl.RightItemClick/TileItem.RightItemClick) events in code.

The TileItem.RightItemClick event is not fired for check items (see the TileControl.ItemCheckMode property description).

If your users use touch screens, and you want to handle the ItemClick event to display a modal window when a user taps on a touch screen, wrap your code that displays the modal window within the Control.BeginInvoke method. For example, you can use the following code:

csharp
private void tileItem1_ItemClick(object sender, TileItemEventArgs e) {
    this.BeginInvoke(new MethodInvoker(delegate {
        (new Form2()).ShowDialog();
    }));
}
vb
Private Sub TileItem1_ItemClick(sender As Object, e As DevExpress.XtraEditors.TileItemEventArgs) Handles TileItem1.ItemClick
    Me.BeginInvoke(New MethodInvoker(Sub()
                                         Call (New Form2()).ShowDialog()
                                     End Sub))
End Sub

See Also

ItemClick

ItemPress

ItemDoubleClick

RightItemClick

ItemClick

ItemPress

ItemDoubleClick

RightItemClick

PerformItemClick()

PerformRightItemClick()

ItemCheckMode

TileItem Class

TileItem Members

DevExpress.XtraEditors Namespace