I have a background worker and in the DoWork method I have the following:
var clipboardData = Application.Current.Dispatcher.Invoke(new Action(() => { Clipboard.GetData(DataFormats.Serializable); }));
Why does this always return null even though I know there is data on the clipboard in the correct format?
Try putting the call into an STA thread:
Within a method with an “OnFinished” action:
You’d use it like this:
If you want to show and hide a window, try this:
With
ShowDialog():