Any code that directly (or indirectly) manipulates user interface elements must be run in the context of the user interface. This usually involves direct manipulation and updating of ViewModels.
In all other situations, you should use ConfigureAwait(false) .
Stephen cleary
source share