Пример #1
0
 private void Accept_Click(object sender, RoutedEventArgs e)
 {
     Windows.UI.Composition.Visual visual =
         Windows.UI.Xaml.Hosting.ElementCompositionPreview.GetElementVisual(Logo);
     pointLight                 = Compositor.CreatePointLight();
     pointLight.Color           = Windows.UI.Colors.White;
     pointLight.CoordinateSpace = visual;
     pointLight.Targets.Add(visual);
     pointLight.Offset =
         new System.Numerics.Vector3(-(float)Logo.ActualWidth * 2, (float)Logo.ActualHeight / 2, (float)Logo.ActualHeight);
     Windows.UI.Composition.ScalarKeyFrameAnimation animation = Compositor.CreateScalarKeyFrameAnimation();
     animation.InsertKeyFrame(1, 2 * (float)Logo.ActualWidth);
     animation.Duration          = TimeSpan.FromSeconds(5.0f);
     animation.IterationBehavior = Windows.UI.Composition.AnimationIterationBehavior.Forever;
     pointLight.StartAnimation("Offset.X", animation);
 }
 public static void UpdateSurfaceBrushOptions(this Windows.UI.Composition.CompositionSurfaceBrush surfaceBrush, Windows.UI.Xaml.Media.Stretch stretch, Windows.UI.Xaml.Media.AlignmentX alignX, Windows.UI.Xaml.Media.AlignmentY alignY, Windows.UI.Composition.ScalarKeyFrameAnimation alignXAnimation = null, Windows.UI.Composition.ScalarKeyFrameAnimation alignYAnimation = null)
 {
 }