https://stackoverflow.com/questions/2694680/no-main-in-wpf
The Main() method is created automatically. If you want to provide your own you have to (tested in VS2013, VS2017 and VS2019):
- Right-click App.xaml in the solution explorer, select Properties
- Change 'Build Action' to 'Page' (initial value is 'ApplicationDefinition')
Then just add a Main() method to App.xaml.cs. It could be like this:
[STAThread]
public static void Main()
{
var application = new App();
application.InitializeComponent();
application.Run();
}
'Windows > C#/WPF' 카테고리의 다른 글
[C#/WPF] 다른 경로로 Managed DLL 호출 (0) | 2022.05.11 |
---|---|
Controls Styles and Templates (0) | 2022.04.14 |
[WPF] 내 나름대로의 MVVM 요약 (수정. 210515_1836) (0) | 2021.05.15 |
[WPF] & 등의 이스케이프 문자 처리 (0) | 2021.05.13 |
[WPF] 나중에 참고할 링크 (0) | 2021.05.12 |
댓글