void SecondaryPage_AddOperationCompeleted(object sender, EventArgs e) { mcvm.GetListCollection(); // Unsubscribe to the event to prevent memory leak (sender as AddNewFavourite).AddOperationCompeleted -= SecondaryPage_AddOperationCompeleted; // Do something after change }
public MyCreatedCollections() { InitializeComponent(); mcvm = new MyCreatedCollectionViewModel(); //BindingContext = new MyCreatedCollectionViewModel();//this was the original that worked //im saving it cos i suffered to understand it //now lemme try this new one below mcvm.GetListCollection(); BindingContext = mcvm; }
public Favorites(NewCategoryDetailModel.Deal deals) { InitializeComponent(); mcvm = new MyCreatedCollectionViewModel { IsEnabled = true, CurrentlySelectedFavorite = deals }; mcvm.GetListCollection(); BindingContext = mcvm; }