private void SaveFilter() { var currentfilter = filterControl.GetFilter(); var sfd = new SaveFileDialog { Title = "Select a location to save the filter", Filter = "XML file (*.xml)|*.xml" }; if (sfd.ShowDialog() == DialogResult.OK && !string.IsNullOrEmpty(sfd.FileName)) { XmlSerializerHelper.SerializeToFile(currentfilter, sfd.FileName); MessageBox.Show(this, "Filter saved!", "Information", MessageBoxButtons.OK, MessageBoxIcon.Information); } }