BoldSignEasily embed eSignatures in your .NET applications. Free sandbox with native SDK available.
public class Behavior : Behavior<SfListView>
{
SfListView Listview;
protected override void OnAttachedTo(SfListView bindable)
{
Listview = bindable;
Listview.ItemTapped += Listview_ItemTapped;
base.OnAttachedTo(bindable);
}
private void Listview_ItemTapped(object sender, Syncfusion.ListView.XForms.ItemTappedEventArgs e)
{
var listview = sender as SfListView;
var currentItem = listview.CurrentItem as BookInfo;
if (currentItem == null)
return;
App.Current.MainPage.DisplayAlert("Message", "CurrentItem of listview: " + currentItem.BookName, "Ok");
}
}
|
public partial class MainPage : ContentPage
{
BookInfo previousBtnItem=null, previousEntryItem=null,currentEntryItem,currentButtonItem;
public MainPage()
{
InitializeComponent();
}
private void Entry_Focused(object sender, FocusEventArgs e)
{
var bcEntry = (sender as Entry).BindingContext as BookInfo;
currentEntryItem = bcEntry;
if (previousEntryItem!=null)
{
DisplayAlert("Message", "Previous entry item " + previousEntryItem.BookName, "Ok");
}
previousEntryItem= currentEntryItem;
}
private void Button_Clicked(object sender, EventArgs e)
{
var bcButton = (sender as Button).BindingContext as BookInfo;
currentButtonItem = bcButton;
if (previousBtnItem != null)
{
DisplayAlert("Message", "Previous entry item " + previousBtnItem.BookName, "Ok");
}
previousBtnItem= currentButtonItem;
}
}
|