Page 1 of 1

Indexer binding not updated

Posted: 11 Nov 2023, 00:28
by Feldruebe
Hello,

I have a binding on a List using an indexer.
Something like this:
Property
public List<Test> MyList
{
	get => this.myList;
        set => this.SetField(ref this.myList, value);
}
Binding
<TextBlock Text="{Binding MyList[0].Text, ElementName=Root}"></TextBlock>
Now I want to update the element. In my case setting the first element to null.
this.MyList[0] = null;
this.OnPropertyChanged(nameof(this.MyList));
In Unity this does not update the binding. I WPF this does work. Is this a Bug or is it unsupported, did not find anything in the docs?

Re: Indexer binding not updated

Posted: 11 Nov 2023, 01:00
by Feldruebe
Nevermind was a mistake by me. It works.