Thread ID: |
Created: |
Updated: |
Platform: |
Replies: |
147151 | Sep 3,2019 10:17 AM UTC | Sep 23,2019 12:25 PM UTC | Xamarin.Forms | 9 |
![]() |
Tags: SfListView |
public class MainPageViewModel : BindableBase, INavigationAware
{
public Command<object> EditCommand { get; set; }
public MainPageViewModel()
{
EditCommand = new Command<object>(OnSwipeEdit);
}
private void OnSwipeEdit(object obj)
{
var swipedItem = obj as Contacts;
var newPage = new NewPage();
newPage.BindingContext = swipedItem;
OnResettingSwipeView(new ResetEventArgs());
App.Current.MainPage.Navigation.PushAsync(newPage);
}
} |
private void UpdateExpenseTapped(object obj)
{
var itemData = obj as ExpenseDetail;
var upsertPage = new UpsertExpense(true, 0, itemData.ID);
upsertPage.BindingContext = itemData;
upsertPage.BindingContext = new UpsertExpenseViewModel(true, 0, itemData.ID); // from UpsertExpense.xaml.cs
OnResettingSwipeView(new ResetEventArgs());
App.Current.MainPage.Navigation.PushAsync(upsertPage);
}
|
This post will be permanently deleted. Are you sure you want to continue?
Sorry, An error occured while processing your request. Please try again later.
This page will automatically be redirected to the sign-in page in 10 seconds.