In my wpf application when I select listboxItem, SelectionChanged event of listbox is not firing. However event fires when I click on outer margin. have a look at below snap.
so basically, when I click on section inside Red border(Right Image), Selection change event is not firing, but when I click on outer border (White color part), selection change fires.
While searching about issue, I am not sure but I found it may be issue due to event tunneling. However I have only a bit of knowledge about tunneling yet.
So can any one please help me how this can get working so that selection change fire when I click on listboxitem (Red section)
let me if I need to further clear question. I am also putting listbox code here
<ListBox x:Name="Listbox1" SelectionChanged="listBox1_SelectionChanged">
<ListBox.ItemTemplate>
<DataTemplate>
<ListBoxItem Margin="10" Content="{Binding Name}" Height="25"
BorderBrush="#FF404040" BorderThickness="0,0.25" />
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
Thanks in anticipation