Commits

Forrest Humphrey committed c6efee8

Show how to use Triggers to change the button on MouseOver

Comments (0)

Files changed (2)

Meme/Meme/MainWindow.xaml

                     <ContentPresenter x:Name="Contents" HorizontalAlignment="Center" VerticalAlignment="Center" Width="Auto" Margin="3,3,3,3"/>
                 </Grid>
             </Border>
+            <ControlTemplate.Triggers>
+                <Trigger Property="IsMouseOver" Value="True">
+                    <Setter TargetName="BorderUp"  Property="Background">
+                        <Setter.Value>
+                            <LinearGradientBrush StartPoint=".5,0" EndPoint=".5,1">
+                                <GradientStop Color="#aaffff" Offset="0"/>
+                                <GradientStop Color="#446688" Offset="0.6"/>
+                                <GradientStop Color="#666666" Offset="1"/>
+                            </LinearGradientBrush>
+                        </Setter.Value>
+                    </Setter>
+                </Trigger>
+                <Trigger Property="IsMouseOver" Value="False">
+                    <Setter TargetName="BorderUp" Property="Background">
+                        <Setter.Value>
+                            <LinearGradientBrush StartPoint=".5,0" EndPoint=".5,1">
+                                <GradientStop Color="#aaaaff" Offset="0"/>
+                                <GradientStop Color="#444466" Offset="0.6"/>
+                                <GradientStop Color="#444444" Offset="1"/>
+                            </LinearGradientBrush>
+                        </Setter.Value>
+                    </Setter>
+                </Trigger>
+            </ControlTemplate.Triggers>
         </ControlTemplate>
     </Window.Resources>
         <DockPanel>

Presentation/coding_note_card.txt

 
 	* Open Meme app, show basic functionality ('hg up 65')
 	* Use glass button template ('hg up 66')
-	* talk about why the button doesn't change on MouseOver
+	* talk about why the button doesn't change on MouseOver
+	* Show the use of Triggers to change the button on MouseOver ('hg up 67')
+	
+Animation