Permalink
Cannot retrieve contributors at this time
Fetching contributors…
| <!-- <SnippetRectangleOpacityFadeExampleXaml> --> | |
| <Window x:Class="WpfApplication1.MainWindow" | |
| xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | |
| xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | |
| Title="MainWindow" Height="350" Width="525"> | |
| <Grid> | |
| <StackPanel Margin="10"> | |
| <Rectangle | |
| Name="MyRectangle" | |
| Width="100" | |
| Height="100" | |
| Fill="Blue"> | |
| <Rectangle.Triggers> | |
| <!-- Animates the rectangle's opacity. --> | |
| <EventTrigger RoutedEvent="Rectangle.Loaded"> | |
| <BeginStoryboard> | |
| <Storyboard> | |
| <DoubleAnimation | |
| Storyboard.TargetName="MyRectangle" | |
| Storyboard.TargetProperty="Opacity" | |
| From="1.0" To="0.0" Duration="0:0:5" | |
| AutoReverse="True" RepeatBehavior="Forever" /> | |
| </Storyboard> | |
| </BeginStoryboard> | |
| </EventTrigger> | |
| </Rectangle.Triggers> | |
| </Rectangle> | |
| </StackPanel> | |
| </Grid> | |
| </Window> | |
| <!-- </SnippetRectangleOpacityFadeExampleXaml> --> |