I have a list view that is hooked to an Observable collection as it's ItemsSource. I keep getting collection must be empty being using ItemsSource. Is this because I'm specifying the columns I want in the XMAL?
If so how would I make sure the IsChecked value is a checkbox and the rest text?
XMAL
<ListView x:Name="lstNextGen" HorizontalAlignment="Stretch" Height="430" Margin="10,95,10,0" VerticalAlignment="Top" Width="793">
<Style TargetType="ListViewItem">
<Style.Triggers>
<Trigger Property="ItemsControl.AlternationIndex" Value="0">
<Setter Property="Background" Value="WhiteSmoke" />
</Trigger>
<Trigger Property="ItemsControl.AlternationIndex" Value="1">
<Setter Property="Background" Value="LightBlue" />
</Trigger>
</Style.Triggers>
</Style>
<ListView.View>
<GridView>
<GridView.Columns>
<GridViewColumn>
<GridViewColumn.CellTemplate>
<DataTemplate>
<CheckBox Tag="{Binding IsChecked}" IsChecked="{Binding RelativeSource={RelativeSource AncestorType={x:Type ListViewItem}}, Path=IsSelected}" />
</DataTemplate>
</GridViewColumn.CellTemplate>
</GridViewColumn>
<GridViewColumn DisplayMemberBinding="{Binding PatientName}" Header="Patient Name" Width="300px" />
<GridViewColumn DisplayMemberBinding="{Binding DOB}" Header="D.O.B." Width="75px" />
<GridViewColumn DisplayMemberBinding="{Binding AppointmentDate}" Header="Appointment Date" Width="150" />
<GridViewColumn DisplayMemberBinding="{Binding DocumentType}" Header="Document Type" Width="150px" />
</GridView.Columns>
</GridView>
</ListView.View>
</ListView>
C#