Can anyone tell me how this would look like in C#?
<EventTrigger RoutedEvent="Button.Click" SourceName="btnSplit">
<EventTrigger.Actions>
<BeginStoryboard>
<Storyboard>
<DoubleAnimation From="0" To="1" Duration="0:0:0.25" Storyboard.TargetName="gridSplit" Storyboard.TargetProperty="(FrameworkElement.LayoutTransform).(ScaleTransform.ScaleY)"/>
<DoubleAnimation From="1" To="0" Duration="0:0:0.25" Storyboard.TargetName="gridJoin" Storyboard.TargetProperty="(FrameworkElement.LayoutTransform).(ScaleTransform.ScaleY)"/>
</Storyboard>
</BeginStoryboard>
</EventTrigger.Actions>
</EventTrigger>
I don't need the "RoutedEvent"-Part because I want to execute the Code when the User Clicks on a Button programmatically (Click-EventHandler).. The RoutedEvent Handler gets called first which is why I can't do a if-else and need to do the whole Animation in code-behind.
Thanks in advance!
MemphiZ