title: How to load from relative path in WPF application?
body: <p>I'm reading an xml file and want to make it from a relative directory based on the location of the application, similar to ASP.NET with Server.MapPath or using the tilda.</p>
  
  <p>How can you get the relative path in WPF?</p>
  
  <pre><code>WORKS: XDocument xmlDoc = XDocument.Load(@"c:\testdata\customers.xml");
  DOES NOT WORK: XDocument xmlDoc = XDocument.Load(@"~\Data\customers.xml");
  DOES NOT WORK: XDocument xmlDoc = XDocument.Load(@"~/Data/customers.xml");
  </code></pre>