Questions tagged [xmldataprovider]

provides data binding from XML in Microsoft Windows Presentation Foundation (WPF) 4

MSDN links

81 questions
13
votes
4 answers

How do I create a new row in WPF DataGrid when it is bound to an XmlDataProvider?

I have a project with an XmlDataProvider bound to a WPF DataGrid control. I have the bindings on the DataGrid set up as follows:
bluepolystyreneman
  • 131
  • 1
  • 1
  • 3
7
votes
1 answer

Are WPF binding properties Path and XPath mutually exclusive?

Suppose I have a UserControl whose DataContext is set to an object that has an XmlDataProvider property. I would like to bind to this property in my control's XAML, and specify some XPath. I tried this:
sourcenouveau
  • 29,356
  • 35
  • 146
  • 243
4
votes
4 answers

XmlDataProvider has inline XML that does not explicitly set its XmlNamespace

I've been playing around with XmlDataProvider with inline XML. Here's my code:
dandax
  • 1,267
  • 3
  • 15
  • 22
3
votes
1 answer

Binding against the XmlDataProvider fails?

I have some Problems with Binding of a XmlDataProvider to the WPF TreeView. The TreeView is XAML-Defined like this: and I have a HierarchicalDataTemplate in the Parent Grid…
bolia
  • 131
  • 7
3
votes
2 answers

How to load an xml string in the code behind to databound UI controls that bind to the XPath of the XML?

Every sample that I have seen uses static XML in the xmldataprovider source, which is then used to databind UI controls using XPath binding. Idea is to edit a dynamic XML (structure known to the developer during coding), using the WPF UI. Has…
Vin
  • 6,115
  • 4
  • 41
  • 55
3
votes
1 answer

how to change xmldataprovider source in wpf at runtime?

I made an application which draws a tree of organization based on values from an xml file. The xaml file goes like this :
arety
  • 33
  • 1
  • 3
2
votes
1 answer

Adding Event Handlers to WPF DataGrid throws NullReferenceException

I'm not sure what's wrong with the DataGrid I've written. The contents show up correctly but when I try to add in a OnSelectionChanged event handler, sth odd happens.Please help me! Firstly, no problems below:
Erencie
  • 391
  • 2
  • 3
  • 12
2
votes
1 answer

WPF, read data from XmlDataProvider in C#

I want a TreeView with checkboxes and I'm trying to follow this tutorial. However, in it, he creates all his content for the TreeView at runtime. I have an XML file that I have accessible as an XmlDataProvider in my XAML:
Sarah Vessels
  • 30,930
  • 33
  • 155
  • 222
2
votes
2 answers

xmldataprovider using element values in code behind

I have a wpf window where I am using xml data through an XMLDataProvider. The screen is based on a grid and all the data is being displayed correctly, having defined the xml as follows...
RosieC
  • 649
  • 2
  • 11
  • 27
2
votes
1 answer

Several XPath for one XmlDataProvider WPF

I have 2 DataGrid and one XmlDataProvider for XML-file. XML-file structure looks like this:
kodwi
  • 97
  • 1
  • 10
2
votes
1 answer

How to access the attribute of a parent node using F# Data's XML Type Provider?

How to access the attribute of a parent node using F# Data's XML Type Provider? Let's say I have the following XML:
prokilomer
  • 252
  • 1
  • 10
2
votes
1 answer

Binding Checkbox "IsChecked" value to external XML file via XmlDataProvider (utilizing MVVM)

After searching and trying several options over the last week, I can't seem to find what I am looking for; maybe someone here can help. While reading through this, please keep in mind that I am attempting to utilize MVVM as strictly as possible,…
amkuchta
  • 33
  • 8
2
votes
3 answers

How to bind XmlDataProvider.Source to MVVM property

I've got a treeview bound to an XmlDataProvider following this example. The app I am working on is following the MVVM pattern and the Xml is from a file that the user will open. When I try to bind the Source property of the XmlDataProvider like…
dkackman
  • 15,179
  • 13
  • 69
  • 123
2
votes
3 answers

HierarchicalDataTemplate and HeaderedItemsControl with ControlTemplate fails to show nested data

I can get this pattern to work with Menu and TreeView but I must be missing something when I make an attempt with HeaderedItemsControl:
rasx
  • 5,288
  • 2
  • 45
  • 60
2
votes
1 answer

XmlDataProvider Refresh source WPF

I have a WPF Grid
Monomachus
  • 1,448
  • 2
  • 13
  • 22
1
2 3 4 5 6