private void Add_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) }; profile = serializer.Deserialize("Test_user.xml"); ProfileBL profileBL = new ProfileBL(profile); profileBL.AddSpend(spend); serializer.Serialize(profile, "Test_user.xml"); Navigation.PushAsync(new HistoryOfPurchases()); }