Hi, I have a problem to bind class to checkboxes as a part of listbox.
So, I have a simple class
Public Class QuickLinq
Public Name As String
Public Linq As String
Public Check As Boolean
End Class
Xaml
<ListBox x:Name="Automatization" Height="100" Margin="0" Background="#FFE6E6E6">
<ListBox.ItemTemplate>
<DataTemplate>
<CheckBox x:Name="QLIC" Content="{Binding Name}" IsChecked="{Binding Check}" ToolTip="{Binding Linq}" HorizontalAlignment="Left" VerticalAlignment="Top"/>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
And main code
Public QuickL As New List(Of QuickLinq)
Automatization.ItemsSource = QuickL
QuickL.Add(New QuickLinq)
QuickL(QuickL.Count - 1).Name = "MyName"
QuickL(QuickL.Count - 1).Linq = "MyLinq"
QuickL(QuickL.Count - 1).Check = False
And it's not working... Why?
Aleksey