I created an App.config file in my WPF application:
In your app.config, change your appsetting to:
app.config
c:\testdata.xml
Then, in the code-behind:
string xmlDataDirectory = WpfApplication1.Properties.Settings.Default.appsetting.ToString()