Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

TileItem.ItemPress Event

Fires when a user presses the current tile.

Namespace: DevExpress.XtraEditors

Assembly: DevExpress.XtraEditors.v24.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