These are chat archives for AvaloniaUI/Avalonia

1st
Aug 2017
EinApfelBaum
@EinApfelBaum
Aug 01 2017 21:04
Hi guys, first thanks for the nice work =) It is awesome!
Can you please have a look at my question on stackoverflow.
https://stackoverflow.com/questions/45423086/listbox-with-datatemplate-recognize-selecteditem
I dont know, but a lot of people are thinking it is a WPF question :/
Nikolay
@chegeras
Aug 01 2017 21:08
@EinApfelBaum second answer is good enought. Use INotifyPropertyChanged.
Wiesław Šoltés
@wieslawsoltes
Aug 01 2017 21:10
@EinApfelBaum See my answer
EinApfelBaum
@EinApfelBaum
Aug 01 2017 21:20
@chegeras Okay this works, but how can I find out which item of my list has changed.
@wieslawsoltes no does not work, it works, when i click on the textbox border.
When I check the CheckBox or type something in the textbox i dont get a PropertyChange
EinApfelBaum
@EinApfelBaum
Aug 01 2017 21:27
image.png
Here you can see, the first row is selected but i am changing the text of the fifth row. So the SelectedItem of the ListBox is not changing. How can I recognice, that the fifth element has changed ?
Nikolay
@chegeras
Aug 01 2017 21:42
@EinApfelBaum you can use more complicative setter for item properties like
private bool _isMarked; public bool IsMarked { get {return _isMarked} set{ if(_isMarked == value) return; _isMarked = value; RaisePropertyChanged("IsMarked") } }
Nikolay
@chegeras
Aug 01 2017 21:52
Add subscription on this event when you add items to collection
Guys, this test poject causes permanent AvaloniaDesigner crash.
FixMe button doesn't help