Denis
await-work in thread class is different from await-work in task class?
When you run a task, it doesn't create a new thread. It schedules your given unit of work to be executed without blocking the calling thread. Whether this actually happens or not is up to the .net task scheduler.
Using .Wait on a task, afaik, mitigates the whole point of the task and will end up running on the calling thread.
When a task completes and returns, it can switch back to the caller context. However, if you do not need this, you can call ConfigureAwait(false) to disable returning to the calling thread context
4 replies
Access dependency property from a viewmodel WPF
Dependency props are part of the view and shouldn't touch the viewmodel
Bind the dependency property to the control that invokes the command, use it as a toggle for the control's IsEnabled, visibility or whatever.
Alternatively, pass the dependency property as the command parameter
4 replies
Accessing Function from Nested UI File - Avalonia
Reactive UI has its own messaging framework - https://www.reactiveui.net/docs/handbook/message-bus.html
17 replies