Results 1 to 3 of 3

Thread: XmlDataProvider Relative Path

  1. #1

    Thread Starter
    Member
    Join Date
    Nov 2016
    Posts
    37

    XmlDataProvider Relative Path

    Hi lads,

    Code:
        <Window.Resources>
        	<XmlDataProvider x:Key="XmlData" Source="d:/Terms.xml" XPath="Terms" />
        	<ItemsPanelTemplate x:Key="VSP">
                <VirtualizingStackPanel />
            </ItemsPanelTemplate>
        </Window.Resources>
    I am trying to find a way to load the file Terms.xml from the same folder as my application. The code above works (Source="d:/Terms.xml"), but I'd like to place Terms.xml in the same folder as my application, I have tried different approaches but no success so far.

    Could anyone help?

  2. #2
    PowerPoster Zvoni's Avatar
    Join Date
    Sep 2012
    Location
    To the moon and then left
    Posts
    4,971

    Re: XmlDataProvider Relative Path

    Last edited by Zvoni; Tomorrow at 31:69 PM.
    ----------------------------------------------------------------------------------------

    One System to rule them all, One Code to find them,
    One IDE to bring them all, and to the Framework bind them,
    in the Land of Redmond, where the Windows lie
    ---------------------------------------------------------------------------------
    People call me crazy because i'm jumping out of perfectly fine airplanes.
    ---------------------------------------------------------------------------------
    Code is like a joke: If you have to explain it, it's bad

  3. #3

    Thread Starter
    Member
    Join Date
    Nov 2016
    Posts
    37

    Re: XmlDataProvider Relative Path

    Quote Originally Posted by Zvoni View Post
    Yes, I've already come across that one, but I couldn't get any further

    Edit: This looks good
    Last edited by kmlj; Feb 12th, 2025 at 10:07 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width