Replies: 33 comments
-
Thanks for submitting a new feature request! I've automatically added a vote 👍 reaction to help get things started. Other community members can vote to help us prioritize this feature in the future! |
Beta Was this translation helpful? Give feedback.
-
This issue has been marked as "needs attention 👋" due to no activity for 15 days. Please triage the issue so the fix can be established. |
Beta Was this translation helpful? Give feedback.
-
This issue has been marked as "needs attention 👋" due to no activity for 15 days. Please triage the issue so the fix can be established. |
Beta Was this translation helpful? Give feedback.
-
This issue has been marked as "needs attention 👋" due to no activity for 15 days. Please triage the issue so the fix can be established. |
Beta Was this translation helpful? Give feedback.
-
This issue has been marked as "needs attention 👋" due to no activity for 15 days. Please triage the issue so the fix can be established. |
Beta Was this translation helpful? Give feedback.
-
This issue has been marked as "needs attention 👋" due to no activity for 15 days. Please triage the issue so the fix can be established. |
Beta Was this translation helpful? Give feedback.
-
@ianier Have you been able to investigate this addition? |
Beta Was this translation helpful? Give feedback.
-
I finally inherited from IncrementalLoadingCollection and implemented ICollectionViewFactory.CreateView() to do my own grouping (ICollectionView.CollectionGroups), inheriting from AdvancedCollectionView. Grouping is done with a simple delegate, which proved easier to do than my original idea.
|
Beta Was this translation helpful? Give feedback.
-
This issue has been marked as "needs attention 👋" due to no activity for 15 days. Please triage the issue so the fix can be established. |
Beta Was this translation helpful? Give feedback.
-
This issue has been marked as "needs attention 👋" due to no activity for 15 days. Please triage the issue so the fix can be established. |
Beta Was this translation helpful? Give feedback.
-
This issue has been marked as "needs attention 👋" due to no activity for 15 days. Please triage the issue so the fix can be established. |
Beta Was this translation helpful? Give feedback.
-
This issue has been marked as "needs attention 👋" due to no activity for 15 days. Please triage the issue so the fix can be established. |
Beta Was this translation helpful? Give feedback.
-
This issue has been marked as "needs attention 👋" due to no activity for 15 days. Please triage the issue so the fix can be established. |
Beta Was this translation helpful? Give feedback.
-
This issue has been marked as "needs attention 👋" due to no activity for 15 days. Please triage the issue so the fix can be established. |
Beta Was this translation helpful? Give feedback.
-
This issue has been marked as "needs attention 👋" due to no activity for 15 days. Please triage the issue so the fix can be established. |
Beta Was this translation helpful? Give feedback.
-
This issue has been marked as "needs attention 👋" due to no activity for 15 days. Please triage the issue so the fix can be established. |
Beta Was this translation helpful? Give feedback.
-
This issue has been marked as "needs attention 👋" due to no activity for 15 days. Please triage the issue so the fix can be established. |
Beta Was this translation helpful? Give feedback.
-
Thanks @ianier, I think the ask here is basically the same as #1128 and have ACV support grouping, right? Appreciate your code hint here too. We'll see if we can get a community member to pick this up and see if we can work this all together somehow. |
Beta Was this translation helpful? Give feedback.
-
@michael-hawker: Yes, this is a subset of #1128. I've been using the code above in my app for a while and it works well. IMO, the idea of using a delegate at the collection level (as opposed to having to implement IGrouping on the item) makes it easier to use. |
Beta Was this translation helpful? Give feedback.
-
@vgromfeld @Sergio0694 can we also use the new grouping stuff we added to help in this case as well? @Vijay-Nirmal was interested in trying to help out with improvements to the AdvancedCollectionView, so hoping we can pool all this knowledge together to find a general solution we can have in the Toolkit? |
Beta Was this translation helpful? Give feedback.
-
Yes, looking only at the high level, it seems that there is some overlap with what has been done in |
Beta Was this translation helpful? Give feedback.
-
Potentially related - I'm probably missing something here but I'm a bit confused about the For instance, what I've been doing in my apps is this:
It's that Here's an example in my app Legere, where I'm using this for the grouped collection of subscribed subreddits. The viewmodel is exposing an observable grouped collection, and the view is binding to the view and collection groups in a What I'm thinking is, shouldn't we actually try to pull as much stuff as possible away from platform-specific code, and possibly add this functionality either directly over the existing .NET Standard collections as extension methods, or through a more advanced type inheriting from them and adding the extra logic I see here for eg. supporting incremental loading and whatnot? Just thinking out loud here, as I said I might very well be missing something obvious 😄 |
Beta Was this translation helpful? Give feedback.
-
This may be a case where we just need a good sample which shows how these different elements fit together:
If we can get all those things to work together, we can either realize that we don't need stuff, re-organize what we have, or build the right stuff to make that happen. We definitely want to make it easy to connect the base collection that the developer manages to the UI layer, and @Sergio0694 I think that's where we've thought in the past having the single AdvancedCollectionView would be a single entity to broker all these aspects of the process. However, we also haven't stepped back and looked at the architecture as a whole to figure out what makes sense to build. @Sergio0694 I think you're basically suggesting that we make sure we can build all these individual components in a platform-agnostic way, but still have them work harmoniously together? |
Beta Was this translation helpful? Give feedback.
-
Exactly 😊 |
Beta Was this translation helpful? Give feedback.
-
Good job. I add this code to my project but I have errors. Not found - ObservableVector, IsVectorChangedDeferred... Where can I see the implementation of this code? Maybe samle |
Beta Was this translation helpful? Give feedback.
-
I didn't include that part because my intention was just to illustrate the grouping idea. `
` |
Beta Was this translation helpful? Give feedback.
-
@ianier thanks! |
Beta Was this translation helpful? Give feedback.
-
Does the |
Beta Was this translation helpful? Give feedback.
-
Yes, it still works for me. That's what I use for the media library in my app 'Chronotron'. |
Beta Was this translation helpful? Give feedback.
-
Hello @ianier, thank you for the feedback, maybe you can take a look at where my problem is. I'll go crazy.. 😫 public class Alarm : IComparable<Alarm>
{
public string Station { get; set; }
public EHtAlarmClassType AlarmClassType { get; set; }
public int CompareTo(Alarm other)
{
if (ReferenceEquals(this, other)) return 0;
if (ReferenceEquals(null, other)) return 1;
var stationComparison = string.Compare(Station, other.Station, StringComparison.Ordinal);
if (stationComparison != 0) return stationComparison;
return AlarmClassType.CompareTo(other.AlarmClassType);
}
} ViewModel private ObservableCollection<Alarm> _alarms { get; } = new();
private AdvancedCollectionViewEx _alarmsCollection;
public AdvancedCollectionViewEx AlarmsCollection
{
get => _alarmsCollection;
set
{
_alarmsCollection = value;
OnPropertyChanged(nameof(AlarmsCollection));
}
}
...
var stations = new List<string>
{
"LA1", "ML1", "HSS1", "HSS1-1M1", "HSS1-2M1", "SST2-4V1", "SST2-7M1"
};
var alarmClass = new List<EHtAlarmClassType>
{
EHtAlarmClassType.MESSAGE, EHtAlarmClassType.ALARM, EHtAlarmClassType.WARNING
};
for (int i = 0; i < 10; i++)
{
_alarms.Add(new Alarm
{
AlarmClassType = alarmClass.RandomElement(),
Station = stations.RandomElement()
});
}
AlarmsCollection = new AdvancedCollectionViewEx(_alarms, o => (o as Alarm).AlarmClassType); XAML <controls:DataGrid ItemsSource="{x:Bind ViewModel.AlarmsCollection}"/> |
Beta Was this translation helpful? Give feedback.
-
It would be great for AdvancedCollectionView to implement ICollectionView.CollectionGroups, based on item's IGrouping, just like the default view implementation of CollectionViewSource does.
This would allow using groping and incremental loading together, which CollectionViewSource doesn't support.
Currently I'm working on inheriting from AdvancedCollectionView and redefining CollectionGroups, to see how far I can go with this scenario.
Beta Was this translation helpful? Give feedback.
All reactions