Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
Because I'm a newbie to wpf I'd love to know if you solve the problem or worked around it. Learning as I go. Are you new too?
-
I was just looking at the docs for ObservableCollection and apparently it only refreshes when an item is added or removed from the list in question, but NOT when a change occurs so you might have to bind an event to the textboxes to detect when they are changed and then do a manual refresh.
But thats just my best guess. I've only been using c# for a week. -
inaba46255y@Wisecrack according to reddit I'm "supposed" to make a wrapper class containing the string that inherits from inotifypropertychanged and then having the observablecollection contain those wrapper classes. Either way it's not gonna be pretty
-
@inaba
Try using a collection style in xaml instead, in order to bind the relevant event to do the refresh for you.
I try to avoid creating classes as much as possible simply because it's one more thing to keep track of in my headspace. -
inaba46255y@Wisecrack well shit, looks like making a wrapper class worked.
https://github.com/inabahare/...
with the added bonus that I rediscovered "implicit operator" which is really nice -
@inaba
Really cool, wasn't aware of implicit operators. Saves me having to do all these fucking casts all over the fucking place. -
inaba46255y@Wisecrack yeah implicit operators is one of those things that makes C# such a nice language to use. Properties as well
Related Rants
God damn it wpf I just wanna bind an ObservableCollection<string> to an itembox and then have textfields inside that item box that modifies those strings and have the modifications stay there https://imgur.com/a/Un2nk9V !
rant
strings
immutable collections
grr
wpf