[Data Binding] XMLDataProvider Source

My App should view an XML File in a treeview which is located in the apps bin directory.
I tried to access the file with the XMLDataProvider like this:
<XmlDataProvider x:Key="Fetch" Source="test.xml"/>
In my opinion this should load the file form the bin directory in my solutions file structure but it simply doesn't. If I specifiy the path absolute (like "C:\...\myApp\bin\Debug\test.xml") it works perfectly.

Regards,
ITD

[524 byte] By [IsisTheDamned] at [2008-1-8]
# 1
Did some tests and found something curious: This only works in XAML Pad. If I use the xaml code in a reguar VS2005 Project the provider is empty.
I believe that if I run the code from Visual Studio in an exe process it trys to find the resource test.xml rather than the file. Might this be possible ?

Solution:
Source="pack://siteoforigin:,,,/test.xml"

IsisTheDamned at 2007-10-2 > top of Msdn Tech,Visual Studio Orcas,Windows Presentation Foundation (WPF)...
# 2

Yes, if you don't build your xml file as resource, you need to use site of origin syntax.

Yi-LunLuo-MSFT at 2007-10-2 > top of Msdn Tech,Visual Studio Orcas,Windows Presentation Foundation (WPF)...

Visual Studio Orcas

Site Classified