CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums
Results 1 to 3 of 3

Thread: XAML reading

  1. #1
    Join Date
    Aug 2009

    XAML reading


    I am going to have all XAML in database. I wonder to know how to implement functionality to read xaml from DB. Do I have to make a Parser which can distinguish all controls (buttons, text boxes, etc. ) or apply any other solution? The Parser will be hard to code because xaml will be read as strings so there would be many many operations on it(substring, index of, etc). My question is: is there a better solution for this problem?

  2. #2
    Join Date
    Sep 2009

    Re: XAML reading

    I unsure of what you are trying to do exactly.

    Do you just want to manipulate the XAML document?
    Would it be preferable to avoid creating the object graph (avoid calling XamlReader.Load())?

    If so, you could consider using .NET 4's XamlXmlReader and XamlXmlWriter from System.Xaml.dll.

    See for a number of pointers that might be helpful.

    Hope this helps.
    Thanks, Rob

    Rob Relyea | WPF & Xaml Language Team | /blog | /wpf | /xaml

  3. #3
    Join Date
    Aug 2009

    Re: XAML reading

    Hi Rob,

    thanks a lot for link you posted. But unfortunatelly my problem is not solved... What I wnat to do now? I have a file for example wit canvas definition and button in this canvas. I want to put "Click" attribute into Button definition and load it by XamlReader (using .net 4.0), but I am still getting an error "failed to create 'Click' from the text 'method_name'". How can I use advices from your blog?

    thanks in advance

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Click Here to Expand Forum to Full Width