windowsforms-devexpress-dot-xtragrid-dot-views-dot-tile-dot-tileview-650feb95.md
Occurs when a user presses a tile.
Namespace : DevExpress.XtraGrid.Views.Tile
Assembly : DevExpress.XtraGrid.v25.2.dll
NuGet Packages : DevExpress.Win.Grid, DevExpress.Win.Navigation
[DXCategory("Action")]
public event TileViewItemClickEventHandler ItemPress
<DXCategory("Action")>
Public Event ItemPress As TileViewItemClickEventHandler
The ItemPress event's data class is DevExpress.XtraGrid.Views.Tile.TileViewItemClickEventArgs.
The ItemPress event is raised when a user presses a tile (before this tile is released). The TileView.ItemClick event fires after the tile is released.
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 tileView1_ItemPress(object sender, DevExpress.XtraGrid.Views.Tile.TileViewItemClickEventArgs e) {
this.BeginInvoke(new MethodInvoker(delegate {
(new Form2()).ShowDialog();
}));
}
Private Sub TileView1_ItemPress(sender As Object, e As DevExpress.XtraGrid.Views.Tile.TileViewItemClickEventArgs) Handles TileView1.ItemPress
Me.BeginInvoke(New MethodInvoker(Sub()
Call (New Form2()).ShowDialog()
End Sub))
End Sub
See Also