我尝试了 ILSpy,但失败了:
System.NotImplementedException: StaticResourceStart
в Ricciolo.StylesExplorer.MarkupReflection.XmlBamlReader.ProcessNext()
в Ricciolo.StylesExplorer.MarkupReflection.XmlBamlReader.ReadInternal()
в Ricciolo.StylesExplorer.MarkupReflection.XmlBamlReader.Read()
в System.Xml.Linq.XContainer.ReadContentFrom(XmlReader r)
в System.Xml.Linq.XContainer.ReadContentFrom(XmlReader r, LoadOptions o)
в System.Xml.Linq.XDocument.Load(XmlReader reader, LoadOptions options)
в ILSpy.BamlDecompiler.BamlResourceEntryNode.LoadIntoDocument(IAssemblyResolver resolver, AssemblyDefinition asm, Stream stream)
в ILSpy.BamlDecompiler.BamlResourceEntryNode.LoadBaml(AvalonEditTextOutput output)
в ILSpy.BamlDecompiler.BamlResourceEntryNode.<>c__DisplayClass3.<View>b__1()
我尝试了用于 .Net Reflector 的 Baml Viewer,但它无法生成有效的 XAML。
主要问题是绑定对错误静态资源的引用。
例如(namedViews 是 CollectionViewSource):
Visibility="{Binding Path=Value, Converter={StaticResource namedViews}}"
ToolTip="{StaticResource namedViews}"
还有哪些其他应用程序可以反编译 BAML?BAML 查看器的任何补丁?