Detecting whether on UI thread in WPF and Winforms Detecting whether on UI thread in WPF and Winforms wpf wpf