-
XAML reading
Hi,
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?
-
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 http://blogs.windowsclient.net/rob_r...x-4-beta1.aspx for a number of pointers that might be helpful.
Hope this helps.
Thanks, Rob
Rob Relyea | WPF & Xaml Language Team
robrelyea.com | /blog | /wpf | /xaml
-
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