Blog Archives

WPF Quick Reference

get window handle

IntPtr windowHandle = new WindowInteropHelper(this).Handle;

bring to front

myWindow.Activate();
myWindow.TopMost = true;

common resource dictionaries for skinning (this blog)

References
wpf get window handle (stackoverflow) http://stackoverflow.com/questions/1556182/finding-the-handle-to-a-wpf-window
wpf bring to front (stackoverflow) http://stackoverflow.com/questions/257587/bring-a-window-to-the-front-in-wpf

Get Current Process ID in C# .Net

System.Diagnostics.Process.GetCurrentProcess().Id;

References
MSDN (GetCurrentProcessID), http://msdn.microsoft.com/en-us/library/ms683180(v=vs.85).aspx
MSDN (GetCurrentProcess), http://msdn.microsoft.com/en-us/library/system.diagnostics.process.getcurrentprocess.aspx