I have a tabcontrol, each item of this tabcontrol is made with some label. I insert manually all the information in the different label but I want to bind the information I think is more clean. I have an entity BE this is the data that I want to bien this is my code:
numBe.Content = BE.BE_Numero_BE;
BeDate.Content = BE.BE_Date;
Numcarnet.Content = BE.BE_Numero_carnet;
BeFourn.Content = BE.BE_Fournisseur;
BECom.Content = BE.BE_Commercial;
NumTicket.Content = BE.BE_Numero_ticket;
NumCnt.Content = BE.BE_Numero_carnet;
TypeBe.Content = BE.BE_Type_BE;
BeImm.Content = BE.BE_Immatriculation;
BeSC.Content = BE.BE_Stock_client;
NumS.Content = BE.BE_N_serie;
BeSa.Content = BE.BE_SA;
BeEx.Content = BE.BE_Exutoire;
BeNrcde.Content = BE.BE_NrCde;
I already do this but I don't know how to bind :
<TabControl x:Name="TabControlBe" HorizontalAlignment="Left" Margin="17,425,0,0" Grid.Row="1" Width="471" >
<TabItem>
<TabItem.Header>
<StackPanel Orientation="Horizontal">
<TextBlock>BE1</TextBlock>
</StackPanel>
</TabItem.Header>
<Grid>
<Label Content="Numero Be:" Height="27" VerticalAlignment="Top" HorizontalAlignment="Left" Width="75"/>
<Label x:Name="numBe" Content="{Binding BE_Numero}" Height="25" Margin="0,0,50,0" HorizontalAlignment="Right" Width="331" VerticalAlignment="Top" />...
Thanks for your help