I previously wrote about some fixes I made to the Baml Viewer addin for Reflector. As always happens with these kinds of things, one thing led to another and I ended up finding a few more issues and felt compelled to debug/fix them. Tonight I checked in a few more changes:
- Xml Namespace Mapping Prefixes – While debugging the first set of issues I noticed that the xml namespace mappings weren’t being included. So when a type name was displayed it excluded the prefix – e.g. ButtonChrome instead of theme:ButtonChrome.
- PathData – A reader posted a comment mentioning that path data was always displayed as “???”. I guess this was a placeholder but the functionality was never implemented. This was a bit involved but the baml viewer will now display the path markup notation for the path data geometry. Note, the original value won’t necessarily round trip to the exact original markup but the resulting path should be the same. So if you used m (for a relative move) instead of M (for an absolute move), you may notice that M is output instead. The absolute points were likely calculated when the original path markup was parsed so the output will contain M (i.e. absolute offsets) and the points will be absolute instead of relative.
- Known Colors – Solid color brush values are handled specially by the baml compiler. Previously the only known color that was handled was transparent. All other known colors were output using their ARGB values – incidentally without the leading # so if you tried to use the xaml it would give you an error. The baml viewer will now map these known colors back to the known color name.
I hope I don’t find any more issues but if you find something interesting I may try to look into it as time allows.