c# - Code require restart of store app. How to run this code when user closes app? -



c# - Code require restart of store app. How to run this code when user closes app? -

i have written code swap configs in windows 8 app. needs immediate restart of app.

here's i've tried:

1) close application. apparently forbidden microsoft.

2) accepts user's config change, add together tasks done when app next closed. using application.exit event in wpf, missing in here. can see onsuspending, isn't sufficient because application may resumed current memory intact.

3) restart application. still looking in one. suspect i'd have quite clever not violate microsoft rules related question

here's i've not tried: hotswapping (this dev effort , bug risk , isn't worth it), locking ui , compelling user close (just no) etc etc. ... asking nicely, i've not tried that.

i think 2 option

- how can schedule , run code on closing of application?

restarting windows app not possible far know. had similar issue when needed restart app in order switch themes (dark or light). ended displaying message end user indicating restart needed apply new setting. have seen other people closing app throwing exception, works closing part isn't elegant.

c# windows-store-apps winrt-xaml

Comments

Popular posts from this blog

java Multi query from Mysql using netbeans -

c# - DotNetZip fails with "stream does not support seek operations" -

c++ - StartServiceCtrlDispatcher don't can access 1063 error -