View Single Post
Old Nov 25, 2012, 02:49 PM   #3
FordGT90Concept
"I go fast!1!11!1!"
 
FordGT90Concept's Avatar
 
Join Date: Oct 2008
Location: IA, USA
Posts: 10,575 (6.28/day)
Thanks: 1,755
Thanked 2,596 Times in 1,960 Posts

System Specs

http://msdn.microsoft.com/en-us/library/ms597013.aspx

Application.Current.Shutdown()


WPF is just a displayer of data. If you want to "compare the content" then you should compare the underlying, databound collections. Copying and pasting is also performed via the databound collections.


Edit: Technically the correct method to terminate an application is to end all threads...

In console programs, the thread that runs the console is the main thread. Close the application by making sure nothing is keeping the main thread open (e.g. Console.ReadKey() or close all worker threads).

In WinForms and WPF programs, the thread that runs the main form is the main thread. Call this.Close() from within the form to gracefully terminate the application. If there are worker threads that are busy, make sure to close them before calling this.Close().

All applications gracefully terminate when all their threads are closed. The only scenario where Shutdown(), Exit(), or similar should be called is in the case of major, unrecoverable error.
__________________
Golden Rule of Programming: Never assume.

try { SteamDownload(); }
catch (Steamception ex) { RageQuit(); }

Last edited by FordGT90Concept; Dec 1, 2012 at 06:14 PM.
FordGT90Concept is offline  
Crunching for Team TPU
Reply With Quote