icsharpcode/ILSpy

WPF issues

Open

#2253 opened on Dec 29, 2020

View on GitHub
 (3 comments) (0 reactions) (0 assignees)C# (25,162 stars) (3,645 forks)batch import
BugHelp WantedXAML

Description

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