I'm having problems on Binding a TextBox to a string ( same problem for StringBuilder).
Here is the xaml:
<ListBox x:Name="MyList" ItemsSource="{Binding ListOfBullets, Mode=TwoWay, Converter=StaticResourcedebugConverter}}">
<ListBox.ItemTemplate>
<DataTemplate>
<local:TaskStepControl Text="{Binding Mode=TwoWay}" AddHnadler="{Binding DelegateForHandlingAddTaskStep, ElementName=uc}"></local:TaskStepControl>
</DataTemplate>
</ListBox.ItemTemplate>
and the Items for the ListBox is:
public ObservableCollection<StringBuilder> ListOfBullets{get{....} set{....}}
I also tried :
public ObservableCollection<string> ListOfBullets{get{....} set{....}}
If I run the app I get an unhalted exception "The parameter is incorrect. " If I remove Mode=TwoWay then it works but as expected editing the Textboxes don't change the text bound object in ListOfBullets;
What am I doing wrong?