Hi !
I need to handle the behavior of the add/remove button (+/-) from the IList editor. So I created an editor for IList with a label and a + button like this:
<grids:PropertyEditor PropertyType="collections:IList">
<grids:PropertyEditor.ValueTemplate>
<DataTemplate>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<Label Content="{Binding Value}" />
<Button Grid.Column="1" Click="CollectionButton_OnClick" Content="+" BorderThickness="0" Padding="5,0,5,0" Background="Transparent"/>
</Grid>
</DataTemplate>
</grids:PropertyEditor.ValueTemplate>
</grids:PropertyEditor>
So this is working as I want, I can control what's happening when I click on the + button.
Now I want to do the same thing for the - button, but as I don't know what will be the type inside my List (can be List<String> or anything else) I don't know how and where can I handle this ?