M
M
Mikhail Usotsky2016-12-29 12:44:07
WPF
Mikhail Usotsky, 2016-12-29 12:44:07

Is it possible to do data synchronization through properties without Dispatcher?

I perform almost all data synchronization through Dispatcher. And everything works. But I had a question. All incoming data is thrown onto the property from the stream. In another part of the program, where directly related to the user interface, subscribed to the event of this property using INotifyPropertyChanged. But you still need to take the mutable data through the Dispatcher. Is it possible to somehow do without the Dispatcher?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry Gavrilenko, 2016-12-29
@Maddox

It is forbidden. If you really want to, then you can create a class that implements INotifyPropertyChanged and already inherit it in the class you need. In the created class in the constructor, store the dispatcher
and then in the method that you must implement
use this dispatcher
this._disp.Invoke(..........);

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question