Managing a listbox in the code behind c#

Havet Thibault 1 Reputation point

Hi, I have this ListBox

<ListBox x:Name="LBMatch" Grid.Column="0" Grid.Row="3" Margin="10,8,10.2,21.4" ItemsSource="{Binding}">
<StackPanel x:Name="SPHorizontal" Orientation="Horizontal">
<Label x:Name="LP1VSP2"/>
<Label x:Name="LDateAffrontement"/>

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

Windows Presentation Foundation
Windows Presentation Foundation
A part of the .NET Framework that provides a unified programming model for building line-of-business desktop applications on Windows.
2,689 questions
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,406 questions
{count} votes