I have a WPF Code which looks something like this.
public class AlphaProductesVM : BaseModel
{
private ObservableCollection
The SynchronizationContext.Current property will only return a value when invoked on the main thread.
If you need to use a SynchronizationContext object in threads other than the main thread, you could pass the SynchronizationContext instance associated to the main thread to the classes that need it as a dependency.
If you choose this solution, you could register the SynchronizationContext object obtained from the SynchronizationContext.Current property on the main thread as a singleton in your container. That way all requests for a SynchronizationContext from that point on will automatically be satisfied by the container with the singleton:
// Must run in the main thread
container.RegisterInstance(SynchronizationContext.Current);