I've searched my little heart out and its entirely possible that I'm missing something critical and obvious.
I have a BitArray and a series of checkboxes that are bound to elements in the array, like so:
<CheckBox IsChecked="{Binding Permissions[0]}" />
<CheckBox IsChecked="{Binding Permissions[1]}" />
...
<CheckBox IsChecked="{Binding Permissions[5]}" />
They get their values from that property correctly, but changing the checkboxes doesn't seem to trigger that property's setter.
I tried a really simple example with a single TextBox bound to an element of a string array.
class TestArray
{
private string[] _nameArray = new string[3];
public TestArray()
{
_nameArray[1] = "test name";
}
public string[] NameArray
{
get { return _nameArray; }
set { _nameArray = value; }
}
}
Here's the UI element:
<TextBox Text="{Binding NameArray[1], UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}" />
Again, this TextBox gets the name from the binding just fine, but doesn't hit the setter if I change it.
This could totally be a bonehead question and may stem from a serious lack of understanding so thanks for your patience!