SHARE
TWEET

Untitled

a guest Feb 9th, 2016 101 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <Window x:Class="AnimationBindingTest.MainWindow"
  2.        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3.        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4.        xmlns:app="clr-namespace:AnimationBindingTest"
  5.        Title="MainWindow" Height="350" Width="525">
  6.     <Grid x:Name="OuterGrid">
  7.         <StackPanel x:Name="ContractSelect_Panel" Width="100" Height="30" Opacity="0.2" Background="Green">
  8.             <StackPanel.Resources>
  9.                 <Storyboard x:Key="ShowModal">
  10.                     <DoubleAnimation Storyboard.TargetName="ContractSelect_Panel"
  11.                             Storyboard.TargetProperty="Opacity"
  12.                             To="1" Duration="0:0:0.15"/>
  13.  
  14.                     <DoubleAnimation Storyboard.TargetName="ContractSelect_Panel"
  15.                             Storyboard.TargetProperty="Width"
  16.                             To="264" Duration="0:0:0.15"/>
  17.  
  18.                     <DoubleAnimation Storyboard.TargetName="ContractSelect_Panel"
  19.                             Storyboard.TargetProperty="Height"
  20.                             To="{Binding ActualHeight, ElementName=OuterGrid}" Duration="0:0:0.15"/>
  21.                 </Storyboard>
  22.             </StackPanel.Resources>
  23.             <StackPanel.Triggers>
  24.                 <EventTrigger RoutedEvent="MouseUp">
  25.                     <BeginStoryboard Storyboard="{StaticResource ShowModal}"/>
  26.                 </EventTrigger>
  27.             </StackPanel.Triggers>
  28.         </StackPanel>
  29.     </Grid>
  30. </Window>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top