Skip to content

Use Stylet in a single instance application via Mutex #328

Answered by canton7
mwdpb asked this question in Q&A
Discussion options

You must be logged in to vote

Why not keep the entry point as Application, but do the mutex check in the Bootstrapper's OnStart method (or perhaps later, e.g. in Configure)?

Another option is to write your own Main, then set it as the entry point in the project properties (in Application -> General -> Startup object). That means you can keep your App.xaml set as an ApplicationDefinition.

If neither of those work, take a look at the code that WPF is generating (in obj), and find the difference between the outputs for ApplicationDefinition and Page.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@mwdpb
Comment options

Answer selected by mwdpb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants