Bonjour à toutes et à tous,
J'ai un nouveau petit problème de style qui s'impose (et oui je suis en plein dedans !).
Alors je me retrouve toujours avec mon fameux Bouton/Menu voici le code du Style:

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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
      <Style x:Key="ImageTextMenuButtonStyleMode2D3D" TargetType="{x:Type Button}">
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
        <Setter Property="HorizontalContentAlignment" Value="Center"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="Padding" Value="1"/>
        <Setter Property="Template">
          <Setter.Value>
            <ControlTemplate TargetType="{x:Type Button}">
              <Border SnapsToDevicePixels="True" x:Name="Bd" Background="{TemplateBinding Background}" 
                    BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" 
                    ContextMenu="{TemplateBinding ContextMenu}" >
                <Grid Width="Auto" Height="Auto" x:Name="Grid">
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto" />
                    <ColumnDefinition Width="Auto" />
                  </Grid.ColumnDefinitions>
                  <Button x:Name="BtnIco2D3D" Grid.Column="0" Content="{TemplateBinding Content}" 
                        Style="{DynamicResource MyToolBarButtonStyle}"  
                        Background="#FFFFFFFF" BorderBrush="{x:Null}" BorderThickness="0.7,0.7,0.7,0.7" Padding="0"
                        Click="BtnIco2D3D_Click"  />
                  <Button x:Name="triangleButton2D3D" Grid.Column="1" BorderThickness="0.7,0,0,0" 
                        Style="{DynamicResource TriangleButtonStyle}" Background="#00DE2424" BorderBrush="{x:Null}" 
                        Click="triangleButton2D3D_Click" />
                </Grid>
              </Border>
              <ControlTemplate.Triggers>
                <MultiTrigger>
                  <MultiTrigger.Conditions>
                    <Condition Property="IsMouseOver" Value="True"/>
                    <Condition Property="IsFocused" Value="False"/>
                  </MultiTrigger.Conditions>
                  <Setter Property="Foreground" TargetName="BtnIco2D3D" Value="#000000" />
                  <Setter Property="Background" TargetName="BtnIco2D3D" Value="#FFFFFFFF" />
                  <Setter Property="Background" TargetName="Bd" Value="{DynamicResource ToolBarIsHighlightedBrush}"/>
                  <Setter Property="BorderBrush" TargetName="Bd" Value="{DynamicResource MenuIsHighlightedBorderBrush}"/>
                  <Setter Property="BorderBrush" TargetName="triangleButton2D3D" Value="{DynamicResource MenuIsHighlightedBorderBrush}"/>
                </MultiTrigger>
                <Trigger Property="IsEnabled" Value="false">
                  <Setter Property="Foreground" Value="#B4AF91"/>
                </Trigger>
              </ControlTemplate.Triggers>
            </ControlTemplate>
          </Setter.Value>
        </Setter>
      </Style>
J'aurais souhaité lorsque j'attaque la propriété isEnable de mon bouton pouvoir jouer uniquement sur le isEnable de celui-ci : BtnIco2D3D et non pas sur celui-ci :triangleButton2D3D auriez-vous une idée de comment je pourrais m'y prendre ?

Merci d'avance