Don't use a ref. Just set the settings as a public property on the window
public class SettingsEditor : Window
{
public XmlElement Settings {get;set;}
/*...*/
}
Within the Window, update the settings and such as you've done. Once the window has been shown, get the settings out.
/*...*/
var editor = new SettingsEditor { Settings = settings };
editor.ShowDialog();
settings = editor.Settings;
/*...*/
You can also set a DialogResult on your window to see what happened with the editor...
Will
2009-12-17 18:16:43