This question is locked. New answers and comments are not allowed.
Hi, I have some animated bars (border objects) in my gridview, inside GridViewColumn.CellTemplates, which "grow" from zero to a binding value when the gridview loads. My problem is when the grid is bigger than its container, then I get a scroll (which is OK). But when moving the scroll I get the animation every time a bar appears, which is too much. I'd like the bars to animate just when loading the gridview, and no animation when scrolling, how can I achieve this?
My animated borders are something like this:
<Border x:Name="bordeDispo" (...)>
(...)
<Border.Triggers>
<EventTrigger RoutedEvent="Border.Loaded">
<EventTrigger.Actions>
<BeginStoryboard>
<Storyboard>
<DoubleAnimation Storyboard.TargetProperty="Width"
Storyboard.TargetName="bordeDispo"
From="0" To="{Binding (...) }" Duration="0:0:0.5" BeginTime="0:0:0.5">
<DoubleAnimation.EasingFunction>
<PowerEase Power="6" EasingMode="EaseInOut" />
</DoubleAnimation.EasingFunction>
</DoubleAnimation>
</Storyboard>
</BeginStoryboard>
</EventTrigger.Actions>
</EventTrigger>
</Border.Triggers>
</Border>
Thanks
My animated borders are something like this:
<Border x:Name="bordeDispo" (...)>
(...)
<Border.Triggers>
<EventTrigger RoutedEvent="Border.Loaded">
<EventTrigger.Actions>
<BeginStoryboard>
<Storyboard>
<DoubleAnimation Storyboard.TargetProperty="Width"
Storyboard.TargetName="bordeDispo"
From="0" To="{Binding (...) }" Duration="0:0:0.5" BeginTime="0:0:0.5">
<DoubleAnimation.EasingFunction>
<PowerEase Power="6" EasingMode="EaseInOut" />
</DoubleAnimation.EasingFunction>
</DoubleAnimation>
</Storyboard>
</BeginStoryboard>
</EventTrigger.Actions>
</EventTrigger>
</Border.Triggers>
</Border>
Thanks