title: How to get selected radio button in selected list item from wpf listbox
body: <p>Image of the list box is as follows:</p>
  
  <p><a href="https://i.stack.imgur.com/4acg5.png" rel="nofollow noreferrer">Listbox with Dynamic column with check boxes and static radio buttons</a></p>
  
  <p>I have to look for the selected items from list box and selected radio button for each selected item</p>
  
  <pre><code>&lt;ListBox Height="226" HorizontalAlignment="Left" Margin="404,339,0,0" Name="listBoxItems" VerticalAlignment="Top" Width="282" SelectionChanged="listBoxItems_SelectionChanged" SelectionMode="Multiple"&gt;
              &lt;ListBox.ItemTemplate&gt;
                  &lt;DataTemplate&gt;
                      &lt;StackPanel Orientation="Horizontal" Margin="10,5,0,0"&gt;
                          &lt;CheckBox Width="130" x:Name="chbPrescr"  Content="{Binding}" IsChecked="{Binding RelativeSource={RelativeSource AncestorType={x:Type ListBoxItem}}, Path=IsSelected}"&gt;
                              &lt;!--&lt;TextBlock Text="{Binding}" Width="115"&gt;&lt;/TextBlock&gt;--&gt;
  
                          &lt;/CheckBox&gt;
                          &lt;RadioButton x:Name="rdOD" Width="40" Content ="OD" Checked="rdOD_Checked" /&gt;
                          &lt;RadioButton x:Name="rdBD" Width="40" Content ="BD" Checked="rdBD_Checked"/&gt;
                          &lt;RadioButton x:Name="rdTDS" Width="40" Content ="TDS" Checked="rdTDS_Checked"/&gt;
                      &lt;/StackPanel&gt;
                  &lt;/DataTemplate&gt;
              &lt;/ListBox.ItemTemplate&gt;
          &lt;/ListBox&gt;
  </code></pre>
  
  <p>And at the postback event I am getting selected list item but not the selected radio button for that selected list item</p>
  
  <pre><code>foreach (var items in listBoxItems.SelectedItems)
  { 
      string a = items.ToString();
      ItemCollection itemCollection = listBoxItems.Items;
      object currentItem = itemCollection.CurrentItem;
  }
  </code></pre>
  
  <p>I need to know how can I get the category for each of the selected medicine. Thanks</p>