Completely hide WPF window on startup?

后端 未结 3 861
别跟我提以往
别跟我提以往 2021-02-03 22:29

I want that my window is completely hidden on the startup. No window, no entry in the taskbar. The user doesn\'t see, the application is started.

How can I realize that?

3条回答
  •  面向向阳花
    2021-02-03 23:23

    Simply don't create a window, just delete the StartupUri from App.xaml.

    It might be helpful to set the Application to ShutDownMode="OnExplicitShutdown" this will prevent that your application shuts down if your last window was closed.

提交回复
热议问题