-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
ReactiveUI Events doesn't seem to have an implementation of SelectionChanged for ListView #2791
Comments
If you're in a position to you can try moving to our preferred mechanism now the source generator https://github.com/reactivemarbles/ObservableEvents#observable-event-generator
|
Not in a position at the moment. Going to go ahead and use Observable.FromEventPattern for the moment, if there truly is no event implementation yet. Like this (I was wondering if I had maybe missed something...) I'll explore using the generator sometime down the line. |
When you are in a position it should be a straight swap over, no change in the syntax. |
The event I'm trying to subscribe to is System.Controls.Listview. The readme only discusses using the generator on my classes. So how would I get it to generate the event for external assemblies like that? |
The generator will work for ListView automatically. |
Gotcha! |
What version of Visual Studio are you using? |
2019 v16.9.4 |
New enough to handle source generators although v16.10 is better. Sometimes you might need to give the project a compile first. |
I've tried rebuilding, reopening solution, installing from the package manager GUI instead of adding the packagereference to the .csproj. Nothing... Updated VS to 16.10.2. Still getting:
|
No luck. Maybe there is something funky going on with Nuget? <PackageReference Include="ReactiveMarbles.ObservableEvents.SourceGenerator" Version="1.0.2" PrivateAssets="all" /> to my .csproj, the package manager GUI no longer sees any of my other packages, just that one. But regardless of how I reference it in my project, the compiler will not pick it up. |
If you want you can jump onto Slack I can probably maybe give you a bit more interactive help rather than in a issue. https://www.reactiveui.net/slack |
I was having a similar issue as @Awsmolak. After some troubleshooting, I found a solution. See this issue. The key that helped me find the solution was the build failing in The fix is simply to add |
Looks like there is a solution bsaed on @drepamig -- Thanks for the help. |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Attempting to use the events on a listview to get the selected items.
In my viewmodel:
Does not work because Events() doesn't seem to have SelectionChanged implemented.
The text was updated successfully, but these errors were encountered: