View Single Post
Old 11-27-2006   #1 (permalink)
Larry Andersen


 
 

Help! XmlDataProvider 'cannot locate resource'

Hi there,

I'm trying to do a simple binding to an external xml file that is located on
my hard drive in the same director as the application source code. I set up
an XmlDataProvider as follows in my xaml:

<XmlDataProvider x:Key="XmlDS" Source="Kiosk.xml"/>

When I execute the app, I get an IOException that says "cannot locate
resource 'kiosk.xml'"

I've tried changing the source to the following:

"Kiosk.xml"
"\Kiosk.xml"
".\Kiosk.xml"
"..\..\Kiosk.xml"
"file://kiosk.xml"

None of the above work.

If I embed the xml file in the assembly, everything works fine.

Is there something I'm missing?

Thanks.

--
New to EID and loving it
My System SpecsSystem Spec