Replies: 2 comments 2 replies
-
|
Check out https://www.reactiveui.net/docs/getting-started/installation/windows-presentation-foundation.html See if the builder and the windows version help you |
Beta Was this translation helpful? Give feedback.
-
|
Thanks Glenn, this solved my problem, but... |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Upgrading from Version 21.0.1 to 22.1.1 or 22.2.1, I stumbled on a strange problem.
Simple use of ReactiveCommand.Create() errors in an InvalidOperationException of "The calling thread cannot access this object because a different thread owns it"
This happens only on the first Command Assigned.
// DummyCommand = ReactiveCommand.Create(() => { CommandAction = 0; });
Button1Command = ReactiveCommand.Create(() => { CommandAction = 1; });
Button2Command = ReactiveCommand.Create(() => { CommandAction = 2; });
Button3Command = ReactiveCommand.Create(() => { CommandAction = 3; });
If the order of Assigning Commands is changed, always the first Command will error in an Exception.
Assigning a DummyCommand (which is never used) can be a workaround.
The Commands are declared like this:
public ReactiveCommand<Unit, Unit> Button1Command { get; set; }
public ReactiveCommand<Unit, Unit> Button2Command { get; set; }
public ReactiveCommand<Unit, Unit> Button3Command { get; set; }
Downgrading from 22.2.1 to 21.0.1 or older, and the problem is gone.
Very simple App, nothing but one window with a few Buttons.
VS 2022 and VS2026
.Net9 and .Net10
ReactiveTest - 2022.zip
Does someone experience this same issue and is there a solution?
Or am I missing something in this simple approach with Reactive Commands?
Beta Was this translation helpful? Give feedback.
All reactions