locked
Want to use fixed background instead of using any storyboard RRS feed

  • Question

  • A single Storyboard is working fine with my Border and TextBlock code as:

    <Border x:Name="border" Background="Black" d:LayoutOverrides="Width">
                    <TextBlock x:Name="textBlock" TextWrapping="Wrap" Text="TextBlock" Foreground="White" Margin="10,5"/>
                </Border>

    The Storyboard is as:

    <Storyboard x:Key="OnMouseEnter1">
                <ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(Panel.Background).(SolidColorBrush.Color)" Storyboard.TargetName="border">
                    <EasingColorKeyFrame KeyTime="0" Value="Black"/>
                    <EasingColorKeyFrame KeyTime="0:0:0.2" Value="#FF116033"/>
                </ColorAnimationUsingKeyFrames>
            </Storyboard>

    My other Border and TextBlock codes are as:

    <Border x:Name="border2" Background="Black" d:LayoutOverrides="Width">
                    <TextBlock x:Name="textBlock2" TextWrapping="Wrap" Text="TextBlock" Foreground="White" Margin="10,5"/>
                </Border>
                <Border x:Name="border1" Background="Black" d:LayoutOverrides="Width">
                    <TextBlock x:Name="textBlock1" TextWrapping="Wrap" Text="TextBlock" Foreground="White" Margin="10,5"/>
                </Border>

    Here for "border2" and "border3" my Storyboard is not working. I do not want to create multiple Storyboards to solve this as want to use only that Storyboard I have created. Could you please suggest me how it can be possible and also,

    in this types of cases can I add mouseover fixed Background instead of using any Storyboards?

    Many Thanks in advance.

    Friday, October 28, 2011 12:38 PM