private void Edit_Purchase_Button_Click(object sender, EventArgs e) { Serializer serializer = new Serializer(); Spend spend = new Spend { Name = nameOfPruchase.Text, Category = categoryPicker.Items[categoryPicker.SelectedIndex], Description = description.Text, Amount = double.Parse(amount.Text), SpendDate = SpendBefore.SpendDate }; profile = serializer.Deserialize("Test_user.xml"); ProfileBL profileBL = new ProfileBL(profile); profileBL.ChangeSpend(spend); serializer.Serialize(profile, "Test_user.xml"); Navigation.PushAsync(new HistoryOfPurchases()); }