❔ WPF - Binding to last child of collection
I have the following setup:
I'm trying to output
LastMessage
in a StatusBar control.
I am following the solution 2 in: https://stackoverflow.com/a/38076864/2275217
However, the StatusBar does not update with new messages. A comment on SO says:
"In case of the property one would want to fire change notifications for said property in case of CollectionChanged
."
However, this is not quite clear to me. What is meant by that? I am using CommunityToolkit.Mvvm for the Observable Object structure, but it wouldn't let me set [ObservableProperty]
on LastMessage
because it's a field.
How to update LastMessage
along with the collection?Stack Overflow
Binding to last array element
So far, i have an ObservableCollection<T> for objects.
I always want to display the last inserted element into a TextBlock. I implemented two solutions in XAML, but both not working:
<
A
Accord•399d ago
Looks like nothing has happened here. I will mark this as stale and this post will be archived until there is new activity.
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
52KMembers
View on DiscordWant results from more Discord servers?
More Posts✅ What does WPF want from me?I'm actually so tired of WPF and MVVM and all this contrived fuckin bs you guys
MainWindow control:❔ I apparently have an infinite loop, but I can't fix it to workI've tried a lot of stuff, even a "NewtonJson" fix I saw, but it wouldn't solve the problem because ✅ doing nothingdfg❔ I would appreciate some help.So i have this assignment and in lieu of my grandma who passed this past week i've not had the oppor