![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
| |
| | #1 (permalink) |
| | Getting Attribute from XmlElement in XAML All: I am using this simple XML file as a test: <students> <student fname="Adam" /> <student fname="Bob" /> </students> I have used an XmlDataProvider to bind these items to a ListBox's ListBoxItems. This mechanism causes the ListBox to hold XmlElements. Works fine. I'm trying to set up a binding so that when the user selects a ListBoxItem, the fname is displayed in a TextBox. If I make the name part of the inner text of the item, it works OK, e.g., <student>Charlie</student> The text can then be retrieved via: <TextBox Text="{Binding SelectedItem.InnerText, ElementName=MyStudentList}"></TextBox> The big question is -- Is it possible in XAML to get an atttribute of an XmlElement from the SelectedItem of a ListBox? What would the sytax be for the binding? Thanks, John |
My System Specs![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| Please help getting data out of this XmlElement | PowerShell | |||
| Is it possible to include XAML files into another XAML file? | .NET General | |||
| How to insert the "modified time" attribute in "date taken" attribute in batch mode-in vista or theough a software? | Vista file management | |||