You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 29, 2024. It is now read-only.
Xamarin Forms SyncFusion DataGrid Component in GridDoubleTapped Function .
same function
https://help.syncfusion.com/xamarin/sfdatagrid/grid-events#griddoubletapped-event
my source......
Xamarin.Forms.DataGrid-master\Xamarin.Forms.DataGrid\DataGrid.xaml.cs
//2018.03.29, [email protected], Double Tap Function Add.
public event EventHandler ItemDoubleTapped;
public DataGrid(ListViewCachingStrategy cachingStrategy)
{
.....
//2018.03.29, [email protected], Double Tap Function Add.
_listView.ItemTapped += (s, e) =>
{
DataGrid_ItemTapped(s, e);
};
}
//2018.03.29, [email protected], Double Tap Function Add.
private int selectedCount = 0;
private ItemTappedEventArgs itemTappedEventArgs;
private void DataGrid_ItemTapped(object sender, ItemTappedEventArgs e)
{
if (this.itemTappedEventArgs != null && e != null && this.itemTappedEventArgs.Item == e.Item)
{
this.selectedCount += 1;
if (selectedCount == 2)
{
System.Diagnostics.Debug.WriteLine("Grid Double Tapped");
ItemDoubleTapped?.Invoke(sender, e);
selectedCount = 0;
}
}
else
{
this.itemTappedEventArgs = e;
selectedCount = 1;
}
}
Xamarin.Forms.DataGrid-master\DataGridSample\DataGridSample\Views\MainPage.xaml
<dg:DataGrid ItemsSource="{Binding Teams}"
SelectionEnabled="True"
SelectedItem="{Binding SelectedTeam}"
Xamarin.Forms.DataGrid-master\DataGridSample\DataGridSample\Views\MainPage.xaml.cs
private void DataGrid_ItemDoubleTapped(object sender, ItemTappedEventArgs e)
{
Debug.WriteLine("Grid Double Tapped");
}
The text was updated successfully, but these errors were encountered: