<syncfusion:SfListView x:Name="listView" Grid.Row="1"
ItemsSource="{Binding Gallerynfo}"
ItemTapped="ListView_ItemTapped"
SelectionMode="None"
ItemSize="150"
ItemSpacing="3"/> |
private async void ListView_ItemTapped(object sender, Syncfusion.ListView.XForms.ItemTappedEventArgs e)
{
await Navigation.PushAsync(new MainPage());
} |
private async void ListView_ItemTapped(object sender, Syncfusion.ListView.XForms.ItemTappedEventArgs e)
{
var newPage = new MainPage();
newPage.BindingContext = e.ItemData;
await Navigation.PushAsync(newPage);
} |
private async void ListView_ItemTapped(object sender, Syncfusion.ListView.XForms.ItemTappedEventArgs e)
{
if ((e.ItemData as ListViewGalleryInfo).ImageId == "1")
{
var newPage1 = new MainPage1();
newPage1.BindingContext = e.ItemData;
await Navigation.PushAsync(newPage1);
}
else if ((e.ItemData as ListViewGalleryInfo).ImageId == "2")
{
var newPage2 = new MainPage2();
newPage2.BindingContext = e.ItemData;
await Navigation.PushAsync(newPage2);
}
else if ((e.ItemData as ListViewGalleryInfo).ImageId == "3")
{
var newPage3 = new MainPage3();
newPage3.BindingContext = e.ItemData;
await Navigation.PushAsync(newPage3);
}
else
{
var newPage = new MainPage();
newPage.BindingContext = e.ItemData;
await Navigation.PushAsync(newPage);
}
} |