I am writing a Windows Phone 8 application. I have a ListBox bound with a class and it contains XML data. In my class there is one field named `Favorite` and I want if `Favorite` equals 0, the CheckBox should be unchecked and if it equals 1 the CheckBox should be checked.
For more info see my code below:

```
<ListBox x:Name="listBox1" Width="429" Height="621" HorizontalAlignment="Left" 
         Margin="21,43,0,59" VerticalAlignment="Top" ItemsSource="{Binding}" 
         SelectedItem="{Binding}" SelectionMode="Extended">
    <ListBox.ItemTemplate>
        <DataTemplate>
            <StackPanel Orientation="Vertical" Width="440">
                <TextBlock Text="{Binding}" TextWrapping="Wrap" Foreground="Black" FontSize="22" Height="30" TextAlignment="Left" Width="Auto" FontWeight="SemiBold"/>
                <TextBlock Text="{Binding}" TextWrapping="Wrap" Foreground="Black" FontSize="22" Margin="5" Height="30" TextAlignment="Left" Width="Auto" FontWeight="SemiBold"/>
                <TextBlock Text="{Binding}" TextWrapping="Wrap" Foreground="Black" FontSize="22" Margin="5" Height="30" TextAlignment="Left" Width="Auto" FontWeight="SemiBold"/>
                <StackPanel>
                    <CheckBox x:Name="CheckBox1" IsChecked="False" Height="72" Foreground="Black" Margin="358,-110,22,0" BorderBrush="Black" Loaded="CheckBox1_Loaded" Checked="CheckBox1_Checked" Unchecked="CheckBox1_Unchecked" />
                </StackPanel>
            </StackPanel>
        </DataTemplate>
    </ListBox.ItemTemplate>
</ListBox>

```

Here is my code-behind file:

```
XDocument doc = XDocument.Parse(e.Result);
List<CUST_CONT> customers = new List<CUST_CONT>();

customers = (from query in doc.Descendants("row")
             select new CUST_CONT
             {
                 Id = query.Element("Id").Value,
                 Name = query.Element("Name").Value,
                 Address = query.Element("Address").Value,
                 Favourite = (query.Element("Favourite").Value)
             }).ToList();
listBox1.DataContext = customers;

```