Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8414275
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T01:07:35+00:00 2026-06-10T01:07:35+00:00

I have a window set up that shows the data in an xml file

  • 0

I have a window set up that shows the data in an xml file and allows the user to change it, save, etc. I have pretty much evertything set up except that I would like to have a textbox or textblock that shows the file path of the current file that the user is working with.

I have an XmlDataProvider set up called ‘xmlData’ and I have the text binding as follows:

Text="{Binding Path=Source, Source={StaticResource xmlData}}"

I have also tried the datacontext to the static resource above and both just give me a blank textbox even though I know there is an xml file in the data provider (I can write to it). Am I missing something or can this not be done this way?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T01:07:36+00:00Added an answer on June 10, 2026 at 1:07 am

    Ok well I figured something out that works but it’s not what I wanted. I ended up going ‘old school’ with it. I put a standard property on my form in the code behind with a backing variable and get/set methods. In the set method I just set the text property to the same value as the backing variable.

    I’m waiting to mark this as the answer to see if someone has a better solution.

    –What I tried–

    After the above answer/conversation I tried sticking a converter in that simply returned the value back so that I could break into it in the debugger and see what was being passed to the converter. No matter what I did I couldn’t get it to hit the breakpoint so it seems like it wasn’t even getting to the converter for some reason.

    I then tried to define a dependency property on the code behind of the form itself and a standard property as a wrapper (where the get and set just use the GetValue and SetValue on the dependency property) and bind the textbox text to that using relativesource and findancestor. Basically I bound the text to that property of the form. Then I changed the property using the wrapper in code behind whenever the user browsed for a new file. This worked on the load up, but whenever I set the value in code it didn’t update the text in the textbox. I even set the binding tracing to high using diagnostics; I saw that it found the form and said it bound to the value, etc. but whenever I hit the browse method and change the path I get no output and no change in the text.

    Like I said, what I have is working and it’s reasonable I guess, but if anyone can add insight as to why this wouldn’t work I would be very interested to know. I am fairly new to WPF so I want to learn to do these things right…

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In WPF I have one window opening a second window that allows some data
I have a .NET winform application that writes an XML data file, but I
I've got a window set up with two NSTableViews. In Core Data I have
I have a pretty straight forward uploadified page that allows users to upload files,
I have a program that shows a lot of data, and I am wondering
I have a windows service that has it's name set by an app.config. I
I have set up a XAMPP installation on a windows server 2008 R2 that
I have a login window with a Sign In button which is set as
When I want a window to be transparent I have to set AllowsTransparency to
I have this code which draws a Window and NSView, and have set up

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.