"Inquisitive の WPF learning" recorded a reverse analysis, a simple WPF application

1. Create a simple TestWpf project, what not to write the code, as shown below:

 

2. I was kind of like people who know these know why, suddenly saw this lump of code is a bit boring.

   No way, only in accordance with I study habits, while access to information, while this figure out how it was a lump of code by means of reverse analysis.

1.<Window x:Class="TestWpf.MainWindow"
2.        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
3.        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
4.        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
5.        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
6.        xmlns:local="clr-namespace:TestWpf"
7.        mc:Ignorable="d"
8.        Title="MainWindow" Height="450" Width="800">
9.     <Grid>    
10.    </Grid>
11.</Window>

 

3. First look at the outermost label, is a pair <Window> </ Window>, it seems looks pretty easy. Window, as the name suggests is that the program creates a window chant.

   So the question is this Window is coming from it, like we have a Int32 this type, belonging to the System namespace.

   Then the Window, which it belongs to the name space, from where it references, references which dll it?

<Window>
</Window>

 

4. This is not simple, according to the label facing Window F12, not to go directly to define it, we take a look.

   

 

   So this is belong Window namespace PresentationFramework.dll this assembly below.

   Absolute path:

C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\PresentationFramework.dll

 

5. According to the Cock consistent style, definitely find this PresentationFramework.dll, decompile see something say.

   Indeed quickly found System.Windows this class.

 

6. This is over? Of course not, let us look at what information there is no fast hardware.

   We see that this assembly also wrote a bunch of fancy stuff, which is what stuff?

   

 

7. with point 6 of doubt that we continue to analyze down

 

Guess you like

Origin www.cnblogs.com/fuhua/p/11921173.html