Windows Vista Forums
Vista Forums Home Join Vista Forums Donate Vista Tutorials Tags

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.
Register at Vista forums...the world biggest Windows Vista resource Join Vista Forums Now

Go Back   Vista Forums > Microsoft Technical Newsgroups > Avalon

Calling an XPath on a Binding with an XmlNode causes StackOverflowException

Update your Vista Drivers Update Your Drivers Now!!
Closed Thread
 
Thread Tools Display Modes
Old 01-05-2007   #1 (permalink)
Keith Patrick
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 SpecsSystem Spec
Closed Thread

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


Update your Vista Drivers Update Your Vista Drivers Now!!

Vistax64.com is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media 2005-2008
Page generated in 0.22922 seconds with 10 queries