I get an “UnauthorizedAccesExpection - Invalid Pass Through" exception when I try to raise a PropertyChanged event from a subscription to an IObservable collection created through Observable.Interval ().
With my limited thread knowledge, I assume that the interval occurs on some other thread, while the event wants to happen on the user interface thread ??? An explanation of the problem would be very helpful.
The code looks a bit:
var subscriber = Observable.Interval(TimeSpan.FromSeconds(1))
.Subscribe(x =>
{
Prop = x;
});
Any solutions?
Edit:
This code is executed from the ViewModel, not the DependencyObject.
source
share