Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在 C# 中,首先加载什么?窗口面板 .xaml 文件中的 XAML 绑定或 .xaml.cs 文件后面的代码中的事件处理程序?
.cs 确实如此。它调用InitializeComponent()which 创建和绑定您的控件。
InitializeComponent()
证明
public partial class MainWindow : Window { public MainWindow() { MessageBox.Show(string.Empty); InitializeComponent(); } }