I have an object that returns a Platform::Collections::Vector that is bound in the UI. When I try to add items to it in a background thread I get an exception. I assume that this is because I am modifying the object on a different thread from
the UI. Is there a way to make the task run on the UI thread? I am using the PPL task class.
By default if you create the task which returns IAsyncTask or IAsyncAction on the UI thread then its completion will run on the UI hread. See the "Managing the Tread Context" section in Asynchronous
programming in C++ (Windows Store apps)