There is a huge number of overloads of StartNew
. One of them accepts a scheduler. Simply pass None
for the other parameters:
Task.Factory.StartNew(() => DoSomething(), CancellationToken.None,
TaskCreationOptions.None, _uiScheduler);