You can use the SaveFileDialog in WinForms to let the user choose a location and filename to save the XML file. Here’s an example:

// Create an instance of SaveFileDialog
SaveFileDialog saveFileDialog = new SaveFileDialog();
saveFileDialog.Filter = "XML Files|*.xml";
saveFileDialog.Title = "Save an XML File";

// Show the Dialog and get result
if (saveFileDialog.ShowDialog() == DialogResult.OK)
    // Use File.WriteAllText to save the XML string to the chosen location
    System.IO.File.WriteAllText(saveFileDialog.FileName, xml);

In this code, replace xml with the XML string you want to save. The Filter property is set to only show .xml files in the dialog. If the user chooses a location and filename and clicks the Save button, the dialog’s ShowDialog method will return DialogResult.OK, and then you can use File.WriteAllText to save the XML string to the chosen file.