In My WPF application,
In this Application i am using One user control.
In the user control button click event we are starting one backgroundworker.
In the background worker we are exporting some data to the .Csv file.
While this process is running we need to cancel the background worker when the user close the mainwindow.
My question is how we can stop when user closes the window.
Please provide me your ideas.