youtube icon indicating copy to clipboard operation
youtube copied to clipboard

Avalonia - Help with grouped collections compiler problem.

Open tslater2006 opened this issue 1 year ago • 1 comments

First off, thanks for the great Avalonia series! I'm trying to reproduce the work you did with the expander menu for the channels, but I get an error here:

image

I see in the video that Rider gives you a warning about this (yellow squiggly) but I'm definitely getting an error. and when trying to compile:

image

I have the _channelConfigurations defined exactly as you have, and the .GroupBy is identical.

image

I'm really new to Avalonia (and MVVM in general) so I don't really know how to troubleshoot this. I did end up trying to just make a Dictionary<string,List<ChannelConfigurationItem>> but that led to its own issues while compiling.

Any help or a guidance on a direction to look at would be very appreciated. In case it matters, I'm using 11.0.0-preview5 (as where it looks like your project is using 11.0.0-preview1) and .NET Core 7.0 instead of 6.0.

tslater2006 avatar Apr 12 '23 16:04 tslater2006

Sigh... and of course after hours of banging my head, I decide to make an issue and then immediately figure out its a problem with compiled bindings. and using {ReflectionBinding Key} instead solves that particular problem :)

tslater2006 avatar Apr 12 '23 16:04 tslater2006