Bonjour à tous,

Pour le besoin de mon application j'ai créé un control Template avec des composant comme des textbox dedans

J'arrive a controler le control template mais pas les composant à l'intérieur

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<ControlTemplate x:Key="TabTemplate"  >
            <Grid x:Name="grid1" x:Uid="grid1">
                <Grid.RowDefinitions>
                    <RowDefinition Height="5*"/>
                    <RowDefinition Height="20*"/>
                    <RowDefinition Height="2*"/>
                    <RowDefinition Height="5*"/>
                    <RowDefinition Height="30*"/>
                    <RowDefinition Height="30*"/>
                    <RowDefinition Height="2*"/>
                    <RowDefinition Height="5*"/>
                    <RowDefinition Height="15*"/>
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
 
                    <ColumnDefinition Width="5*"/>
                    <ColumnDefinition Width="20*"/>
                    <ColumnDefinition Width="5*"/>
                    <ColumnDefinition Width="60*"/>
                    <ColumnDefinition Width="10*"/>
 
 
                </Grid.ColumnDefinitions>
                <Image x:Uid="1" Source="{Binding Path=PhotoInvite}" Grid.Column="1" Grid.Row="1" Height="107" HorizontalAlignment="Left" Name="imageInvite" Stretch="Fill" VerticalAlignment="Top" Width="127" Grid.RowSpan="4" />
                <Image Grid.RowSpan="3" Source="{Binding Path=PHOTO_PERSONNE}" Height="107" HorizontalAlignment="Left" Name="imageUtilisateur" Stretch="Fill" VerticalAlignment="Top" Width="127" Grid.Row="5" Grid.Column="1" />
                <Button x:Name="buttonWebcamInvite" Content="?" FontFamily="Webdings" Grid.Column="1" Grid.Row="4" Height="23" HorizontalAlignment="Left" Margin="0,34,0,0"  VerticalAlignment="Top" Width="29" Click="buttonWebcamInvite_Click"/>
                <Button Content="?" FontFamily="Webdings" Height="23" HorizontalAlignment="Left" Name="buttonWebCamUtilisateur" VerticalAlignment="Top" Width="29" Grid.Column="1" Grid.Row="8" />
                <ListBox Grid.Column="3" Grid.Row="2" Grid.RowSpan="6" Height="233" HorizontalAlignment="Left" Name="listBoxDiscussion" VerticalAlignment="Top" Width="414" Grid.ColumnSpan="2"  />
                <Label Content="{Binding Path=PrenomInvite}" Grid.Column="3" Grid.Row="1" Height="28" HorizontalAlignment="Left" Margin="0,19,0,0" Name="NomInvite" VerticalAlignment="Top" Width="68" />
            </Grid>
            </ControlTemplate>

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
T
abItem TI = new TabItem();
 
 
            TI.Width = 75;
            TI.Height = 25;
            ContentControl CC = new ContentControl();
  ControlTemplate CT =Application.Current.FindResource("TabTemplate") as ControlTemplate;
Comment atteindre les autres composants
Merci d'avance