I want to bind a DataTable to a list of barcodes. I fill the DataTable and set the binding of the ListBox to the DataTable in my code. The XAML looks like this:
<ListBox Height="150" Name="listBox1" Width="225">
<ListBox.ItemTemplate>
<DataTemplate>
<barCode:BarCode Height="80" Caption="{Binding Username}">
<barCode:Code128Symbology Value="{Binding Username}"/>
</barCode:BarCode>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
The caption is bound correctly but not the value! Each barcode has only the default value. How can I bind the barcode value to my DataTable?
[Modified at 03/19/2008 09:39 AM]
<ListBox Height="150" Name="listBox1" Width="225">
<ListBox.ItemTemplate>
<DataTemplate>
<barCode:BarCode Height="80" Caption="{Binding Username}">
<barCode:Code128Symbology Value="{Binding Username}"/>
</barCode:BarCode>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
The caption is bound correctly but not the value! Each barcode has only the default value. How can I bind the barcode value to my DataTable?
[Modified at 03/19/2008 09:39 AM]