I have a slider named tbMaster :
<Slider Name="tbMaster" Maximum="10000" Value="{Binding SbVolumeValue}"/>
code behind for binded property:
double _SbVolumeValue;
public double SbVolumeValue
{
get
{
return _SbVolumeValue;
}
set
{
_SbVolumeValue = value;
OnPropertyChanged("SbVolumeValue");
}
}
I have the storyboard sbVolume
<Storyboard x:Key="sbVolume">
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(RangeBase.Value)" Storyboard.TargetName="tbMaster">
<EasingDoubleKeyFrame KeyTime="0:0:1.2" Value="40">
<EasingDoubleKeyFrame.EasingFunction>
<CircleEase EasingMode="EaseOut"/>
</EasingDoubleKeyFrame.EasingFunction>
</EasingDoubleKeyFrame>
</DoubleAnimationUsingKeyFrames>
</Storyboard>
if I run the application the slider works great. It stops working when I begin the storyboard as:
var sbVolume = this.FindResource("sbVolume") as Storyboard;
sbVolume.Begin();
why does it stops working after I animate it?
Try adding a
FillBehavior.Stopto your Animation. The default isFillBehavior.HoldEnd.From Above Link: