Skip to main content

TileItem.ItemPress Event

Fires when a user presses the current tile.

Namespace: DevExpress.XtraEditors

Assembly: DevExpress.XtraEditors.v23.2.dll

NuGet Package: DevExpress.Win.Navigation

Declaration

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

Event Data

The ItemPress 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

The TileItem.ItemPress and TileControl.ItemPress events are raised immediately after a user presses a tile (before this tile is released). After a tile is released, the control raises the TileControl.ItemClick and TileItem.ItemClick events.

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

If your users use touch screens, and you want to handle the ItemPress 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:

private void tileItem1_ItemPress(object sender, TileItemEventArgs e) {
    this.BeginInvoke(new MethodInvoker(delegate {
        (new Form2()).ShowDialog();
    }));
}
See Also