![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
|
Welcome to Vista Forums we are your forum to discuss Windows Vista x64 and x86 systems. Whether you need help or just want to post an idea you have on Vista, this is the forum for you.
br> br> |
| |||||||
![]() |
| | Thread Tools | Display Modes |
| | #1 (permalink) |
| Guest | Calling an XPath on a Binding with an XmlNode causes StackOverflowException I've been getting a hell of a lot more StackOverflows deep inside the framework (WindowsBase.Utility.LargeSortedObjectMap.GetKeyValuePair) than I'd really rather see, and I've finally hit upon the core scenario that's causing it. Basically, I have a UI that passes around a bunch of XmlNodes as the datasource. If one combo containing XML has an item selected, that item (which is an XmlNode) is now the datasource for another control, etc. I hit the problem at the very end of this chain where I try to do this: <UserControl x:Class="BindingTest" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> <StackPanel> <TextBlock Name="Blah" Text="{Binding XPath=@Name}"/> </StackPanel> </UserControl> And if I look at this user control during debugging, its DataContext is an XmlNode with the OuterXml: <Test Name=\"Why is this not showing up?\"></Test> My question is: what's invalid about this? The data context is what it should be (the control really is supposed to be displaying data contained within that node). I've even tried setting the RelativeSource to TemplatedParent, but that doesn't even work. |
My System Specs![]() |
![]() |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Binding inside binding question | Yoavo | Avalon | 0 | 12-03-2007 08:24 AM |
| Binding Question (Binding in General) | Jason | Avalon | 2 | 05-09-2007 04:41 AM |
| Xml Binding - Why does XPath return nothing? | jmagaram | Avalon | 0 | 10-13-2006 04:25 PM |
| Xml Binding - Why does XPath return nothing? | jmagaram | Avalon | 0 | 10-13-2006 04:24 PM |
| Binding, XPath & Namespaces | Doug | Avalon | 4 | 01-10-2006 03:52 PM |