I am trying to write a Xaml parser that would sort all the attributes of every tags in xaml files to keep the code organized and consistent.
I have fairly limited knowledge of C# and LINQ as I'm a front-end designer / developer, not a C# guru.
As far as I know, xaml is XML therefore, this would work with just any xml files. I will have parameters that will let the user order the attributes.
I tried using Regexp, it didn't go too well, I then tried using "XElement.Parse", no l开发者_JAVA百科uck. It seems to not like x:Name etc.
What would be the best way?
Please show your XAML.
I successfully parsed XAML with x:Key attribute and self:NullableBoolToStringConvreter node from this sample.
Try something like this, using the 4.0 .NET runtime:
http://www.codeproject.com/KB/dotnet/pitfalls_xml_4_0.aspx
精彩评论