private void Delete_Purchase_Button_Click(object sender, EventArgs e) { profile = serializer.Deserialize("Test_user.xml"); ProfileBL profileBL = new ProfileBL(profile); profileBL.DeleteSpendByIndex(indexOfElement); serializer.Serialize(profile, "Test_user.xml"); Navigation.PushAsync(new HistoryOfPurchases()); }