Here is my code , i am using rotation transform and i am getting text rotating in 360 degree but i want it to move over all the screen with constant speed. any one can help in this please?
void OnCompositionTargetRendering(object sender, EventArgs args)
{
// Time-based
TimeSpan elapsedTime = DateTime.Now - startTime;
rotate.Angle = (elapsedTime.TotalMinutes * 360) % 360;
}
使用CompositeTransform,您可以在其中指定旋转和平移
//use layout transform not rendertransform
//for example
<Border BorderThickness="1" BorderBrush="Black" Width="200" Height="20" LayoutTransform="{StaticResource Rotate}">
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.