Here they say that by watching for WM_EndSession message you should be able to watch for a reboot: http://www.autoitscript.com/forum/topic/94616-detect-windows-shutdownlogoffrestart-event/
You will also need to hook to WndProc in your WPF application : How to handle WndProc messages in WPF?