Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <Window x:Class="AnimationBindingTest.MainWindow"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:app="clr-namespace:AnimationBindingTest"
- Title="MainWindow" Height="350" Width="525">
- <Grid x:Name="OuterGrid">
- <StackPanel x:Name="ContractSelect_Panel" Width="100" Height="30" Opacity="0.2" Background="Green">
- <StackPanel.Resources>
- <Storyboard x:Key="ShowModal">
- <DoubleAnimation Storyboard.TargetName="ContractSelect_Panel"
- Storyboard.TargetProperty="Opacity"
- To="1" Duration="0:0:0.15"/>
- <DoubleAnimation Storyboard.TargetName="ContractSelect_Panel"
- Storyboard.TargetProperty="Width"
- To="264" Duration="0:0:0.15"/>
- <DoubleAnimation Storyboard.TargetName="ContractSelect_Panel"
- Storyboard.TargetProperty="Height"
- To="{Binding ActualHeight, ElementName=OuterGrid}" Duration="0:0:0.15"/>
- </Storyboard>
- </StackPanel.Resources>
- <StackPanel.Triggers>
- <EventTrigger RoutedEvent="MouseUp">
- <BeginStoryboard Storyboard="{StaticResource ShowModal}"/>
- </EventTrigger>
- </StackPanel.Triggers>
- </StackPanel>
- </Grid>
- </Window>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement