Bonjour
voici mon probleme
j'ai deux dictionnaires de style
- StyleA.xaml
- StyleB.xaml

dans chacun d'eux
j'ai une definition pour un datatemplate sur un type
dans StylaA
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
 <BitmapImage x:Key="image"
                 UriSource="a.png" />
    <DataTemplate DataType="{x:Type local:Personne}">
        <StackPanel Orientation="Vertical">
            <TextBlock Text="Nom" />
            <TextBox Text="{Binding Nom}" />
            <TextBlock Text="Prenom" />
            <TextBox Text="{Binding Prenom}" />
        </StackPanel>
    </DataTemplate>
et dans StyleB
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
    <BitmapImage x:Key="image"
                 UriSource="b.png" />
    <DataTemplate DataType="{x:Type local:Personne}">
        <StackPanel Orientation="Vertical">
            <DockPanel Margin="0,2,0,0">
                <TextBlock Text="Nom"
                           DockPanel.Dock="Left"
                           Width="100" VerticalAlignment="Center"/>
                <TextBox Text="{Binding Nom}" />
            </DockPanel>
            <DockPanel Margin="0,2,0,0">
                <TextBlock Text="Prenom"
                           DockPanel.Dock="Left"
                           Width="100" VerticalAlignment="Center"/>
                <TextBox Text="{Binding Prenom}" />
            </DockPanel>
        </StackPanel>
    </DataTemplate>
quand j'inverse les styles (switch des dictionnaires) je vois bien mon image (keey=image) changer mais le style applicqué automatique au contentControl qui contient une Personne ne change pas
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
 <Border Padding="5"
                BorderBrush="Black"
                BorderThickness="1"
                CornerRadius="4"
                Margin="10,10,10.4,64.4">
            <ContentControl Content="{Binding .}"
                            Margin="10" />
        </Border>
j'aimerais savoir comment je peux forcer le rafraichissement en code simplement

merci