Managing a listbox in the code behind c#
Hi, I have this ListBox
<ListBox x:Name="LBMatch" Grid.Column="0" Grid.Row="3" Margin="10,8,10.2,21.4" ItemsSource="{Binding}">
<ListBox.ItemTemplate>
<DataTemplate>
<StackPanel x:Name="SPHorizontal" Orientation="Horizontal">
<Label x:Name="LP1VSP2"/>
<Label x:Name="LDateAffrontement"/>
</StackPanel>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
But I want to get the reference of the label "LP1VSP2" in the code behind in order to set the databinding (I know how to proceed with the dataconverter, the binding, etc), but I don't how to do that : The listbox reference doesn't contain a property "Itemtemplate" nor a property "DataTemplate".
Thanks for the help in advance