-
- lehoang03an
- Posts: 4
- Joined:
DoubleAnimation on RotateTransform.Angle not working on Unreal
Hello,
In this xaml, I try to rotate an image when control is loaded
It works in Blend, but when I import it to Unreal, it shows this error:
In this xaml, I try to rotate an image when control is loaded
Code: Select all
<ControlTemplate x:Key="PlayerInfoPanel" TargetType="{x:Type ContentControl}">
<ControlTemplate.Resources>
<Storyboard x:Key="EndlessRotate">
<DoubleAnimation
Storyboard.TargetProperty="(RenderTransform).(RotateTransform.Angle)" Storyboard.TargetName="Loading"
To="360" Duration="0:0:1.5" RepeatBehavior="Forever"/>
</Storyboard>
</ControlTemplate.Resources>
<Grid>
<Image x:Name="Loading" Visibility="Visible"
Source="Dummy_Loading.png" Width="40" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="0,0,14,0" RenderTransformOrigin="0.5,0.5" >
<Image.RenderTransform>
<RotateTransform/>
</Image.RenderTransform>
</Image></Grid>
<ControlTemplate.Triggers>
<EventTrigger RoutedEvent="Loaded">
<BeginStoryboard Storyboard="{StaticResource EndlessRotate}" x:Name="AnimationBeginStoryboard"/>
</EventTrigger>
</ControlTemplate.Triggers>Can you tell me what is wrong here?Unable to convert '(RenderTransform).(RotateTransform.Angle)' to a valid value for property DoubleAnimation.TargetProperty.
LogNoesis: Warning: Target property not set in timeline
-
-
sfernandez
Site Admin
- Posts: 3363
- Joined:
Re: DoubleAnimation on RotateTransform.Angle not working on Unreal
When using parenthesis syntax to reference a property you have to specify the owner type and the property name in Noesis:
The parenthesis syntax is required for attached properties, but the rest can be referenced by just the name, so the following will also work:
Code: Select all
<DoubleAnimation
Storyboard.TargetProperty="(UIElement.RenderTransform).(RotateTransform.Angle)"
Storyboard.TargetName="Loading"
To="360" Duration="0:0:1.5" RepeatBehavior="Forever"/>Code: Select all
Storyboard.TargetProperty="RenderTransform.Angle"-
- lehoang03an
- Posts: 4
- Joined:
Re: DoubleAnimation on RotateTransform.Angle not working on Unreal
Thanks, it works. Is there any advantage or usecase using parenthesis syntax?
-
-
sfernandez
Site Admin
- Posts: 3363
- Joined:
Re: DoubleAnimation on RotateTransform.Angle not working on Unreal
I have added ticket #2361 to our bugtracker because using "(RenderTransform)" to reference a property in WPF it is supported and we need to fix it.It works in Blend, but when I import it to Unreal, it shows this error
No, both syntaxes are equivalent. As I said the only specific scenario where using parenthesis is strictly required is for attached properties, like inIs there any advantage or usecase using parenthesis syntax?
"(Canvas.Left)".
Who is online
Users browsing this forum: No registered users and 3 guests