Storyboard c++
Posted: 21 Apr 2021, 10:37
Hey, how can I have control of storyboard C++? Can I have any callbacks methods when finished? Or started?
Welcome to our official discussion site. You’ll find topics on features, bugs, development, and general support here
https://www.noesisengine.com/forums/
Storyboard* storyboard = FindResource<Storyboard*>("SomeAnimation");
storyboard->Completed() += [](BaseComponent*, const TimelineEventArgs&)
{
// do something
};
storyboard->Begin(this);<Storyboard>
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)">
<EasingDoubleKeyFrame KeyTime="0" Value="0"/>
<EasingDoubleKeyFrame KeyTime="0:0:0.3" Value="1"/>
</DoubleAnimationUsingKeyFrames>
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TranslateTransform.X)">
<EasingDoubleKeyFrame KeyTime="0" Value="-400"/>
<EasingDoubleKeyFrame KeyTime="0:0:1" Value="300"/>
</DoubleAnimationUsingKeyFrames>
</Storyboard><Rectangle>
<Rectangle.RenderTransform>
<TranslateTransform/>
</Rectangle.RenderTransform>
</Rectangle>Yes, thats was it! I tested it on something other ThanksProbably because your object doesn't have a TranslateTransform set in its RenderTransform property.Code: Select all<Rectangle> <Rectangle.RenderTransform> <TranslateTransform/> </Rectangle.RenderTransform> </Rectangle>