icsharpcode/ILSpy

WPF decompilation issues

Open

#2.253 geöffnet am 29. Dez. 2020

Auf GitHub ansehen
 (3 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)C# (3.645 Forks)batch import
BugHelp WantedXAML

Repository-Metriken

Stars
 (25.162 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 15T 22h) (61 gemergte PRs in 30 T)

Beschreibung

When decompiling WPF, please take care of code-behind files:

  • you can get the class name from the class attr in the xml file>
  • Name the code behind file after the xaml file and append .cs, and place this file in the same folder as the xaml file.
  • There is some auto-generated methods in such classes, marked with AutoGeneratd and/or NouUserCode attrs. Delete them.
  • There are also auto-generated fields corresponding to XAML tags, and there is a private field private bool _contentLoaded;. Delete them.
  • The Buid Action for App.xaml is page, while it should be ApplicationDefinition.
  • The Buid Action for resources like images is EmbeddedResource, while it should be Resource.

There is also a general behavior (not a WPF explosive) of creating all folders in one level with qualified names, which cause many errors with resource paths (as images, xaml, cshtml, etc). Please get rid of the namespace part, and nest folders.

Any doable part of these suggestion will save a lot of users time. Thanks

Contributor Guide