Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No Events for WPF DataGridRow #77

Open
kgday opened this issue Aug 30, 2021 · 6 comments
Open

No Events for WPF DataGridRow #77

kgday opened this issue Aug 30, 2021 · 6 comments

Comments

@kgday
Copy link

kgday commented Aug 30, 2021

This is the code I had when using the old ReactiveUI.Events.WPF

                    FileItemsDataGrid
                        .Events()
                        .LoadingRow
                        .SelectMany(loadingRowArgs => loadingRowArgs.Row.Events().MouseEnter.Select(_ => loadingRowArgs.Row.DataContext as IFileViewModel))
                        .WhereNotNull()
                        .Subscribe(vm => vm.CurrentlyHoveredOver = true)
                        .DisposeWith(d);

but with ReactiveMarbles/.ObservableEvents there is no events (NullEvents) for loadingRowArgs.Row which is a DataGridRow type.

Thanks..

@glennawatson
Copy link
Member

<IncludePackageReferencesDuringMarkupCompilation>true</IncludePackageReferencesDuringMarkupCompilation> you need that one I believe in the property group of your csproj

@glennawatson
Copy link
Member

microsoft/CsWin32#7

@kgday
Copy link
Author

kgday commented Aug 30, 2021

Thanks, but I had that already.

@kgday
Copy link
Author

kgday commented Aug 30, 2021

I use Events() extensively and it works for everything else except for DataGridRow. I have an idea that it is because the only reference to the datagrid row type is in the selectmany.

@kgday
Copy link
Author

kgday commented Aug 30, 2021

I tried adding a

public DataGridRow? dummyRow; //just so events observable can be generagted

But it didn't help.

@kgday
Copy link
Author

kgday commented Aug 30, 2021

Going back to ReactiveUI.Events.WPF for now. My current computer is too slow to use this source generator anyhow as it is, even with version 1.1.4. Hopefully before too long I will upgrade :-)

@glennawatson glennawatson reopened this Sep 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants