代码改变世界

小记 .NET Core 3.0 下 WPF 是如何运行的

2019-10-23 11:34  音乐让我说  阅读(424)  评论(0编辑  收藏  举报

1. 解决方案架构

如图:

 

 

2. 生成的代码

如图:

/// <summary>
/// App
/// </summary>
public partial class App : System.Windows.Application {
    
    /// <summary>
    /// InitializeComponent
    /// </summary>
    [System.Diagnostics.DebuggerNonUserCodeAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.8.0.0")]
    public void InitializeComponent() {
        
        #line 5 "..\..\..\App.xaml"
        this.Startup += new System.Windows.StartupEventHandler(this.App_OnStartup);
        
        #line default
        #line hidden
        
        #line 6 "..\..\..\App.xaml"
        this.DispatcherUnhandledException += new System.Windows.Threading.DispatcherUnhandledExceptionEventHandler(this.App_DispatcherUnhandledException);
        
        #line default
        #line hidden
    }
    
    /// <summary>
    /// Application Entry Point.
    /// </summary>
    [System.STAThreadAttribute()]
    [System.Diagnostics.DebuggerNonUserCodeAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.8.0.0")]
    public static void Main() {
        SkyDemo.WpfUI.App app = new SkyDemo.WpfUI.App();
        app.InitializeComponent();
        app.Run();
    }
}

 

 

 

 

3.

 

谢谢浏览!