How can I animate text in a circular path in winrt?

I am trying to animate text in a circular way in a Windows Store app (C #) for Win8.1. Although there are several examples on the Internet of how to do this with Silverlight and WPF, they do not seem to work at all in WinRT (for example, many methods are missing).

When searching for a solution, I also found the Stackoverflow question below, but it only applies to Windows 8.0, not Windows 8.1, so I couldnโ€™t get it working.

how to create text movement along path animation in winrt application?

Is there any solution for this without re-implementing everything from scratch?

+5
source share
2 answers

Check out the CascadingTextBlock control in the WinRT XAML Toolkit for an example of how to split one TextBlock into several. You just need to change the way you broadcast animations. If your text is a constant line, itโ€™s best to just create an animation in Blend - arrange several single letters of TextBlocks on a circle and create an animation using the provided tools.

+1
source

This does not work? it is just a XAML solution. The storyboard begins with the download.

 <Window x:Class="WpfApplication3.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="MainWindow" Height="350" Width="525"> <Window.Resources> <Storyboard x:Key="Rotate"> <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)" Storyboard.TargetName="Label1"> <EasingDoubleKeyFrame KeyTime="0" Value="0"/> <EasingDoubleKeyFrame KeyTime="0:0:1" Value="360"/> </DoubleAnimationUsingKeyFrames> </Storyboard> </Window.Resources> <Window.Triggers> <EventTrigger RoutedEvent="FrameworkElement.Loaded"> <BeginStoryboard Storyboard="{StaticResource Rotate}"/> </EventTrigger> </Window.Triggers> <Grid> <Label x:Name="Label1" Content="WordsAndStuff" HorizontalAlignment="Left" Margin="218.388,112.806,0,0" VerticalAlignment="Top" RenderTransformOrigin="0.509,1.782"> <Label.RenderTransform> <TransformGroup> <ScaleTransform/> <SkewTransform/> <RotateTransform/> <TranslateTransform/> </TransformGroup> </Label.RenderTransform> </Label> </Grid> 

0
source

Source: https://habr.com/ru/post/1201834/


All Articles