I believe the problem is that the Storyboard is "holding" the value at Visibility.Hidden due to your timeline. This is due to the
FillBehavior .
It's often somewhat problematic mixing properties changing via storyboards with properties changing in CodeBehind. In this case, I'd work around this issue by just adding a storyboard to make the button visible again, and triggering it on button6's click. This is nicer in many ways, since it's 100% xaml, and no code behind. (Plus, it works)
Here's some working code you can try:
<Window.Resources>
<Storyboard x:Key="bn5Click">
<ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="button5" Storyboard.TargetProperty="(UIElement.Visibility)" Duration="00:00:01">
<DiscreteObjectKeyFrame KeyTime="00:00:00" Value="{x:Static Visibility.Visible}"/>
<DiscreteObjectKeyFrame KeyTime="00:00:01" Value="{x:Static Visibility.Hidden}"/>
</ObjectAnimationUsingKeyFrames>
</Storyboard>
<Storyboard x:Key="bn6Click">
<ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="button5" Storyboard.TargetProperty="(UIElement.Visibility)" >
<DiscreteObjectKeyFrame KeyTime="00:00:00" Value="{x:Static Visibility.Visible}"/>
</ObjectAnimationUsingKeyFrames>
</Storyboard>
</Window.Resources>
<Window.Triggers>
<EventTrigger RoutedEvent="ButtonBase.Click" SourceName="button5">
<BeginStoryboard Storyboard="{StaticResource bn5Click}"/>
</EventTrigger>
<EventTrigger RoutedEvent="ButtonBase.Click" SourceName="button6">
<BeginStoryboard Storyboard="{StaticResource bn6Click}"/>
</EventTrigger>
</Window.Triggers>
<Grid>
<Button x:Name="button5" />
<Button Name="button6" HorizontalAlignment="Right" Width="69" Height="60" VerticalAlignment="Bottom" />
</Grid>
Reed Copsey, Jr. -
http://reedcopsey.com