I've created a User Control with a CheckListBox and when the Control is displayed, there is no data visible. I have verified that the CheckListBox items have the contents that were added, but the display has unchecked boxes and no text. What am I missing?
This is the XAML:
<UserControl x:Class="frmMatlList"
Class Used_Material
This is the XAML:
<UserControl x:Class="frmMatlList"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
mc:Ignorable="d" Height="259" Width="478">
<Grid>
<xctk:CheckListBox x:Name="lbMatlList"
Height="250"
Width="400"
DisplayMemberPath="TheText"
ValueMemberPath="TheText"
SelectedMemberPath="IsSelected"
SelectedValue="{Binding TheText}"
Delimiter="|"
SelectedItemsOverride="{Binding SelectedItems}" >
</xctk:CheckListBox>
....
The VB code that inserts data is: Me.lbMatlList.Items.Clear()
iMatls = 0
For iNum = 1 To MatlList.LongCount
tString = MatlList(iNum - 1)
' Check whether this entry should be checked
Used = ContainsLabel(tString, SelMatlList)
Me.lbMatlList.Items.Add(New Used_Material(Used, tString))
Dim MatlItem As Used_Material = Me.lbMatlList.Items(iMatls)
iMatls += 1
Next iNum
with Class:Class Used_Material
Public IsSelected As Boolean
Public TheText As String
Public Sub New(ByVal tmpUsed As Boolean, ByVal tmpName As String)
IsSelected = tmpUsed
TheText = tmpName
End Sub
End Class