c# - Handle the close event via task bar -


i developing wpf application. close applications via task bar. when put mouse on task bar, show preview of application. press center mouse button on preview, application close.

this scenario not working in wpf applications. send application background (gui exit, application still run on background). option have handle onclosing() event. there other method?

sample image

i had came across same issue when tried same thing(closing of application) when on window not mainwindow(or startup uri) object.so advice please handle on closing event of secondary window(other mainwindow) , tried shutdown or exit application below code

private void datawindow_closing(object sender, canceleventargs e) {   application.current.shutdown();   // environment.exit(); } 

wpf automatically shut downs application when on mainwindow , tried exit application.


Comments

Popular posts from this blog

c++ - QTextObjectInterface with Qml TextEdit (QQuickTextEdit) -

javascript - angular ng-required radio button not toggling required off in firefox 33, OK in chrome -

xcode - Swift Playground - Files are not readable -