【发布时间】:2016-06-24 11:46:04
【问题描述】:
为什么Application.Current 在 WinForms 应用程序中为空?应该如何以及何时设置?
我在做:
static class Program {
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main() {
Application.Run(new MainForm());
}
}
【问题讨论】:
-
没有
System.Windows.Forms.Application.Current属性。你在使用 WPF 吗? -
这是这个问题的背景,我正在尝试在这里实施解决方案:stackoverflow.com/questions/35901454/…
-
我看到的链接问题中的唯一答案以 for WPF 开头。
-
这能回答你的问题吗? Application.Current in ElementHost is null