XamlXmlReader.Read() does not yield matching XamlNodeType.StartObject and XamlNodeType.EndObject on

Posted by Yuval on Stack Overflow See other posts from Stack Overflow or by Yuval
Published on 2010-03-27T05:49:25Z Indexed on 2010/03/27 5:53 UTC
Read the original article Hit count: 194

Filed under:
|

Hi, I am trying to parse a valid xaml file using the XamlXmlReader. It looks like it is 'skipping' some elements when when Read() is called.

for example on the following xaml snippet:

<UserControl.Resources>
        <Converters:AnyDbTypeToDisplayNameConverter x:Key="anyDbTypeToDisplayNameConverter"  />
</UserControl.Resources>

when reading I first get a XamlNodeType.StartObject on UserControl.Resources - makes sense then another XamlNodeType.StartObject on Converters - also cool.

but then i do not get a XamlNodeType.EndObject on the Converters and immediately jump to the next line and does not report a XamlNodeType.StartObject.

Any Idea if this is working as design ? looks like a bug to me

© Stack Overflow or respective owner

Related posts about c#4.0

Related posts about xaml