IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Windows Presentation Foundation Discussion :

probleme avec VisualState x:Name="focused"


Sujet :

Windows Presentation Foundation

  1. #1
    Futur Membre du Club
    Femme Profil pro
    Développeur informatique
    Inscrit en
    Août 2011
    Messages
    11
    Détails du profil
    Informations personnelles :
    Sexe : Femme

    Informations professionnelles :
    Activité : Développeur informatique
    Secteur : Communication - Médias

    Informations forums :
    Inscription : Août 2011
    Messages : 11
    Points : 7
    Points
    7
    Par défaut probleme avec VisualState x:Name="focused"
    bonjour à tous,
    voila je debute avec wpf et je voudrais créer une interface jolie avec une petite annimation.
    mon interface est composée d'un menu horizontale (tout comme ce site) et lorsque je click sur chacun des bouttons une animation permet de faire descendre un canvas caché(opacité=0).
    je me suis inspiré d'une application sur internet http://gallery.expression.microsoft....rlighttemplate.

    voici comment j'appel le style pr un boutton
    Code XML : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    <Button x:Name="PcBtn" Style="{StaticResource navButtonPc}" FontSize="14" 
        Content="       Pc" Opacity="100" Canvas.Left="0" Canvas.Top="2"/>

    voici le style du boutton
    Code XML : 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
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    162
    163
    164
    165
    166
    167
    168
    169
    170
    171
    172
    173
    174
    175
    176
    177
    178
    179
    180
    181
    182
    183
    184
    185
    186
    187
    188
    189
    190
    191
    192
    193
    194
    195
    196
    197
    198
    199
    200
    201
    202
    203
    204
    205
    206
    207
    208
    209
    210
    211
    212
    213
    214
    215
    216
    217
    218
    219
    220
    221
    222
    223
    224
    225
    226
    <Style x:Key="navButtonPc" TargetType="Button">
    <Setter Property="FontSize" Value="16"/>
    <Setter Property="Foreground" Value="White"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="Button">
          <Canvas x:Name="NAV">
            <VisualStateManager.VisualStateGroups>
              <VisualStateGroup x:Name="CommonStates">
                <VisualStateGroup.Transitions>
                  <VisualTransition To="Pressed"  GeneratedDuration="0:0:0.01"/>
     
                </VisualStateGroup.Transitions>
                <VisualState x:Name="Normal">                                    
                </VisualState>
                <VisualState x:Name="MouseOver">
                <Storyboard x:Name="ripple">
                  <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="image" Storyboard.TargetProperty="(UIElement.Opacity)">
                    <EasingDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
                    <EasingDoubleKeyFrame KeyTime="00:00:00.3000000" Value="0.75"/>
                    <EasingDoubleKeyFrame KeyTime="00:00:01.1000000" Value="0"/>
                  </DoubleAnimationUsingKeyFrames>
                  <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="image" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)">
                    <EasingDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
                    <EasingDoubleKeyFrame KeyTime="00:00:00.3000000" Value="1.292"/>
                    <EasingDoubleKeyFrame KeyTime="00:00:01.1000000" Value="1.646"/>
                  </DoubleAnimationUsingKeyFrames>
                  <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="image" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)">
                    <EasingDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
                    <EasingDoubleKeyFrame KeyTime="00:00:00.3000000" Value="1.292"/>
                    <EasingDoubleKeyFrame KeyTime="00:00:01.1000000" Value="1.646"/>
                  </DoubleAnimationUsingKeyFrames>
                  <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="image" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)">
                    <EasingDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
                    <EasingDoubleKeyFrame KeyTime="00:00:00.3000000" Value="-0.042"/>
                    <EasingDoubleKeyFrame KeyTime="00:00:01.1000000" Value="-0.021"/>
                  </DoubleAnimationUsingKeyFrames>
                  <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="image" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)">
                    <EasingDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
                    <EasingDoubleKeyFrame KeyTime="00:00:00.3000000" Value="0.5"/>
                    <EasingDoubleKeyFrame KeyTime="00:00:01.1000000" Value="0.25"/>
                  </DoubleAnimationUsingKeyFrames>
                  <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="image1" Storyboard.TargetProperty="(UIElement.Opacity)">
                    <EasingDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
                    <EasingDoubleKeyFrame KeyTime="00:00:00.3000000" Value="0.75"/>
                    <EasingDoubleKeyFrame KeyTime="00:00:01.1000000" Value="0"/>
                  </DoubleAnimationUsingKeyFrames>
                  <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="image1" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)">
                    <EasingDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
                    <EasingDoubleKeyFrame KeyTime="00:00:00.3000000" Value="1.308"/>
                    <EasingDoubleKeyFrame KeyTime="00:00:01.1000000" Value="1.616"/>
                  </DoubleAnimationUsingKeyFrames>
                  <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="image1" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)">
                    <EasingDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
                    <EasingDoubleKeyFrame KeyTime="00:00:00.3000000" Value="1.308"/>
                    <EasingDoubleKeyFrame KeyTime="00:00:01.1000000" Value="1.616"/>
                  </DoubleAnimationUsingKeyFrames>
                  <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="image1" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)">
                    <EasingDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
                    <EasingDoubleKeyFrame KeyTime="00:00:00.3000000" Value="0.269"/>
                    <EasingDoubleKeyFrame KeyTime="00:00:01.1000000" Value="0.538"/>
                  </DoubleAnimationUsingKeyFrames>
                  <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="image1" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)">
                    <EasingDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
                    <EasingDoubleKeyFrame KeyTime="00:00:00.3000000" Value="1"/>
                    <EasingDoubleKeyFrame KeyTime="00:00:01.1000000" Value="1"/>
                  </DoubleAnimationUsingKeyFrames>
                  <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="contentPresenter" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)">
                    <EasingDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
                    <EasingDoubleKeyFrame KeyTime="00:00:00.2000000" Value="-5.494"/>
                    <EasingDoubleKeyFrame KeyTime="00:00:00.5000000" Value="1.006"/>
                  </DoubleAnimationUsingKeyFrames>
                </Storyboard>
                </VisualState>
                <VisualState x:Name="Pressed">
     
                </VisualState>                                   
                <VisualState x:Name="Disabled">                                       
                </VisualState>
              </VisualStateGroup>
              <VisualStateGroup x:Name="FocusStates">
                <VisualState x:Name="Focused">
                  <Storyboard x:Name="Pc1">
     
                    <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="imageSo" Storyboard.TargetProperty="(UIElement.Opacity)">
                      <EasingDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
                      <EasingDoubleKeyFrame KeyTime="00:00:00.0300000" Value="0"/>
                      <EasingDoubleKeyFrame KeyTime="00:00:00.3650000" Value="1">
                        <EasingDoubleKeyFrame.EasingFunction>
                          <ExponentialEase EasingMode="EaseOut"/>
                        </EasingDoubleKeyFrame.EasingFunction>
                      </EasingDoubleKeyFrame>
                    </DoubleAnimationUsingKeyFrames>
                    <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="imageSo" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)">
                      <EasingDoubleKeyFrame KeyTime="00:00:00" Value="4"/>
                      <EasingDoubleKeyFrame KeyTime="00:00:00.0300000" Value="4"/>
                      <EasingDoubleKeyFrame KeyTime="00:00:00.3650000" Value="100">
                        <EasingDoubleKeyFrame.EasingFunction>
                          <ExponentialEase EasingMode="EaseOut"/>
                        </EasingDoubleKeyFrame.EasingFunction>
                      </EasingDoubleKeyFrame>
                    </DoubleAnimationUsingKeyFrames>
                    <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Pc" Storyboard.TargetProperty="(UIElement.Opacity)">
                      <EasingDoubleKeyFrame KeyTime="00:00:00.3700000" Value="0"/>
                      <EasingDoubleKeyFrame KeyTime="00:00:00.5670000" Value="1">
                        <EasingDoubleKeyFrame.EasingFunction>
                          <ExponentialEase EasingMode="EaseOut"/>
                        </EasingDoubleKeyFrame.EasingFunction>
                      </EasingDoubleKeyFrame>
                    </DoubleAnimationUsingKeyFrames>
                    <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="Pc" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)">
                      <EasingDoubleKeyFrame KeyTime="00:00:00.3700000" Value="0"/>
                      <EasingDoubleKeyFrame KeyTime="00:00:00.5670000" Value="41">
                        <EasingDoubleKeyFrame.EasingFunction>
                          <ExponentialEase EasingMode="EaseOut"/>
                        </EasingDoubleKeyFrame.EasingFunction>
                      </EasingDoubleKeyFrame>
                    </DoubleAnimationUsingKeyFrames>
     
                  </Storyboard>
     
                </VisualState>
              <VisualState x:Name="Unfocused">
                  <Storyboard>
                    <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="Pc" Storyboard.TargetProperty="(UIElement.Opacity)">
                      <EasingDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
                    </DoubleAnimationUsingKeyFrames>
                    <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="imageSo" Storyboard.TargetProperty="(UIElement.Opacity)">
                      <EasingDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
                    </DoubleAnimationUsingKeyFrames>
                  </Storyboard>
                </VisualState>
              </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
     
     
            <Image x:Name="imageSo" Height="390" Width="868" Canvas.Left="-54" Canvas.Top="3" Source="big_Images/Layer 2.png" Stretch="Fill" RenderTransformOrigin="0.5,0.5" Opacity="0">
              <Image.RenderTransform>
                <TransformGroup>
                  <ScaleTransform/>
                  <SkewTransform/>
                  <RotateTransform/>
                  <TranslateTransform/>
                </TransformGroup>
              </Image.RenderTransform>
            </Image>
            <Canvas x:Name="Pc" Height="290" Width="844" Canvas.Left="-30" Canvas.Top="160" RenderTransformOrigin="0.5,0.5" Opacity="0"  >
              <Canvas.RenderTransform>
                <TransformGroup>
                  <ScaleTransform/>
                  <SkewTransform/>
                  <RotateTransform/>
                  <TranslateTransform/>
                </TransformGroup>
              </Canvas.RenderTransform>
              <Rectangle Stroke="Black" RadiusX="24" RadiusY="24" Height="286" Width="569" Canvas.Left="272" >
                <Rectangle.Fill>
                  <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                    <GradientStop Color="Black" Offset="0"/>
                    <GradientStop Color="#FF770DBD" Offset="1"/>
                  </LinearGradientBrush>
                </Rectangle.Fill>
              </Rectangle>
     
              <Path Height="164.833" Width="566.5" UseLayoutRounding="False" Canvas.Left="273.167" Canvas.Top="26.167" Data="M0.1013311,164.83301 C0.1013311,164.83301 272.74527,8.1863184 566.49969,49.333008 C566.49969,41.30402 566.49967,0.33300781 566.49967,0.33300781 L2.4835176E-09,1.4996744 z">
                <Path.Fill>
                  <LinearGradientBrush EndPoint="0.44,1.029" StartPoint="0.386,-0.172">
                    <GradientStop Offset="0"/>
                    <GradientStop Color="#6CFFFFFF" Offset="1"/>
                  </LinearGradientBrush>
                </Path.Fill>
              </Path>
              <TextBlock x:Name="aboutContent4" Canvas.Left="526" Canvas.Top="102" Foreground="White" TextWrapping="Wrap"><Run Text="Lorem ipsum dolor sit amet, consectetur adipisicing "/><LineBreak/><Run Text="elit, sed do eiusmod "/><Run Foreground="White" Text="tempor "/><Run Text="incididunt ut labore et "/><LineBreak/><Run Text="dolore magna "/><Run Text="aliqua. Ut enim ad minim veniam, "/><LineBreak/><Run Text="quis nostrud exercitation ullamco laboris nisi."/></TextBlock>
              <TextBlock x:Name="servicesTitle1" Canvas.Left="526" Canvas.Top="72" FontSize="16" FontWeight="Bold" Foreground="White" Text="pc" TextWrapping="Wrap"/>
              <TextBlock x:Name="aboutContent5" Canvas.Left="529" Canvas.Top="188" Foreground="White" TextWrapping="Wrap" Width="273"><Run Text="Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque "/><LineBreak/><Run Text="laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi "/><LineBreak/><Run Text="architecto beatae vitae dicta sunt explicabo. "/></TextBlock>
     
              <TextBlock x:Name="staffTitle2" Canvas.Left="14" Canvas.Top="72" FontSize="16" FontWeight="Bold" Foreground="White" TextWrapping="Wrap" Text="Web Solutions?"/>
              <StackPanel x:Name="StaffPanel2" Width="234" Canvas.Left="15" Canvas.Top="102">
                <TextBlock x:Name="intro2" HorizontalAlignment="Left" Text="Here is some information about our Solutions." TextWrapping="Wrap" Foreground="White" Margin="0,0,0,14"/>
     
              </StackPanel>
            </Canvas>
     
     
     
     
     
            <ContentPresenter x:Name="contentPresenter" RenderTransformOrigin="0.5,0.5" OpacityMask="Black">
              <ContentPresenter.RenderTransform>
                <TransformGroup>
                  <ScaleTransform/>
                  <SkewTransform/>
                  <RotateTransform/>
                  <TranslateTransform/>
                </TransformGroup>
              </ContentPresenter.RenderTransform>
            </ContentPresenter>
            <Rectangle Fill="#FF4B4B4B" RadiusX="24" RadiusY="24" Height="37" Width="1" Canvas.Left="80" Canvas.Top="-7"/>
            <Image x:Name="image1" Height="13" Width="44" Canvas.Left="12" Canvas.Top="4" Source="ripple_Images/Layer 1.png" Stretch="Fill" Opacity="0" RenderTransformOrigin="0.5,0.5">
              <Image.RenderTransform>
                <TransformGroup>
                  <ScaleTransform/>
                  <SkewTransform/>
                  <RotateTransform/>
                  <TranslateTransform/>
                </TransformGroup>
              </Image.RenderTransform>
            </Image>
            <Image x:Name="image" Height="24" Width="82" Source="ripple_Images/Layer 1.png" Stretch="Fill" Canvas.Left="-8" Canvas.Top="-1" Opacity="0" RenderTransformOrigin="0.5,0.5">
              <Image.RenderTransform>
                <TransformGroup>
                  <ScaleTransform/>
                  <SkewTransform/>
                  <RotateTransform/>
                  <TranslateTransform/>
                </TransformGroup>
              </Image.RenderTransform>
            </Image>
          </Canvas>
     
        </ControlTemplate>
     
      </Setter.Value>
     
                </Setter>
            </Style>

    le probleme que j'ai est que le mouse over et le focused s'applique sur toute la surface cachée (le canvas "Pc" et l'image "ImageSo" qui sont appelés dans le VisualState x:Name="focused" ) et non pas juste sur le boutton en lui meme.
    voila je sais pas si j'ai bien expliqué mon probleme.

    merci de votre aide

  2. #2
    Membre éprouvé Avatar de jmix90
    Homme Profil pro
    Consultant .Net
    Inscrit en
    Juillet 2007
    Messages
    576
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 38
    Localisation : France, Paris (Île de France)

    Informations professionnelles :
    Activité : Consultant .Net
    Secteur : Conseil

    Informations forums :
    Inscription : Juillet 2007
    Messages : 576
    Points : 998
    Points
    998
    Par défaut
    Bonjour,

    Citation Envoyé par lilibad Voir le message
    le probleme que j'ai est que le mouse over et le focused s'applique sur toute la surface cachée (le canvas "Pc" et l'image "ImageSo" qui sont appelés dans le VisualState x:Name="focused" ) et non pas juste sur le boutton en lui meme.
    voila je sais pas si j'ai bien expliqué mon probleme.
    Je ne comprends pas ce que cela signifie: l'animation s'applique sur tout le canvas? pas sur le bouton ?

    à bientôt

  3. #3
    Futur Membre du Club
    Femme Profil pro
    Développeur informatique
    Inscrit en
    Août 2011
    Messages
    11
    Détails du profil
    Informations personnelles :
    Sexe : Femme

    Informations professionnelles :
    Activité : Développeur informatique
    Secteur : Communication - Médias

    Informations forums :
    Inscription : Août 2011
    Messages : 11
    Points : 7
    Points
    7
    Par défaut
    oui exactement l'animation se produit sur tt le canvas et non pas que sur le bouton lui mm toute la surface du canvas mm s'il est caché est clickable !!!

  4. #4
    Membre éprouvé Avatar de jmix90
    Homme Profil pro
    Consultant .Net
    Inscrit en
    Juillet 2007
    Messages
    576
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 38
    Localisation : France, Paris (Île de France)

    Informations professionnelles :
    Activité : Consultant .Net
    Secteur : Conseil

    Informations forums :
    Inscription : Juillet 2007
    Messages : 576
    Points : 998
    Points
    998
    Par défaut
    Pour que le Canvas ne soit pas clickable il faut que tu utilises la propriété IsHitTestVisible:
    1. Tu la mets à False quand il est caché,
    2. à True lorsqu'il est affiché.


    Bon courage,

  5. #5
    Futur Membre du Club
    Femme Profil pro
    Développeur informatique
    Inscrit en
    Août 2011
    Messages
    11
    Détails du profil
    Informations personnelles :
    Sexe : Femme

    Informations professionnelles :
    Activité : Développeur informatique
    Secteur : Communication - Médias

    Informations forums :
    Inscription : Août 2011
    Messages : 11
    Points : 7
    Points
    7
    Par défaut
    Merci pr ta réponse, mais en fait mon canvas contient des boutton et plein de chose si je fait ce que tu m'as dit alors qd je remet à true la mm animation est effectuée donc ça ne résoud pas mon probleme

  6. #6
    Membre éprouvé Avatar de jmix90
    Homme Profil pro
    Consultant .Net
    Inscrit en
    Juillet 2007
    Messages
    576
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 38
    Localisation : France, Paris (Île de France)

    Informations professionnelles :
    Activité : Consultant .Net
    Secteur : Conseil

    Informations forums :
    Inscription : Juillet 2007
    Messages : 576
    Points : 998
    Points
    998
    Par défaut
    Hello,

    Peut tu me décrire précisément le comportement que tu constates en nommant bien les éléments et les actions que tu effectues stp ?

    De même, précises moi ce qui ne fonctionne pas comme prévu...

    Merci

  7. #7
    Futur Membre du Club
    Femme Profil pro
    Développeur informatique
    Inscrit en
    Août 2011
    Messages
    11
    Détails du profil
    Informations personnelles :
    Sexe : Femme

    Informations professionnelles :
    Activité : Développeur informatique
    Secteur : Communication - Médias

    Informations forums :
    Inscription : Août 2011
    Messages : 11
    Points : 7
    Points
    7
    Par défaut
    ce que je veux est que lorsque je clique sur un boutton un canvas que j'appel "Pc" s'affiche (animation desendre). pour cela j'ai mis l'opacité de mon canvas "Pc" a 0, ensuite je devait trouver l'evenement d'un click boutton, celui ke j'ai utiliser est VisualState x:Name="Focused" (VisualStateManager). dans cette balise (focused) j'ai mis mon animation (opacité devient 100 et le canvas descend). le probleme est que mon canvas "Pc" ce trouve dans le mm canvas du ControlTemplate et donc l'évenement focused s'applique aussi sur mon canvas "Pc".
    Le resultat est que tte la surface du canvas réagit de la mm maniere que mon boutton voila. j'éspere que c un peu plus clair.

    Merci de ton aide, c super gentil.

Discussions similaires

  1. [AC-2013] Problemes avec insert into et les simple quote
    Par Alann dans le forum Requêtes et SQL.
    Réponses: 5
    Dernier message: 18/07/2014, 17h41
  2. [VC++] probleme avec le Pipe Named
    Par ksoft dans le forum Visual C++
    Réponses: 2
    Dernier message: 21/07/2006, 18h34
  3. Réponses: 2
    Dernier message: 30/08/2004, 14h48

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo