Exemplo n.º 1
0
        private void SplashScreen_Loaded(object sender, RoutedEventArgs e)
        {
            // set assembly information
            var Assembly = Application.ResourceAssembly.GetName();
            var Version  = Assembly.Version;
            var attr     = Application.ResourceAssembly.GetCustomAttribute(typeof(AssemblyCopyrightAttribute));

            AssemblyInfo.Text  = "Version " + Version.Major + "." + Version.Minor + " (" + Assembly.ProcessorArchitecture + ")\n";
            AssemblyInfo.Text += (attr as AssemblyCopyrightAttribute).Copyright;
            // run background thread to close window
            var bg = new Thread(() => AutoClose());

            bg.Start();
            DoubleAnimation da = new DoubleAnimation();

            da.From     = 0.0;
            da.To       = 1.0;
            da.Duration = new System.Windows.Duration(new System.TimeSpan(0, 0, 0, 0, 1000));
            Logo.BeginAnimation(System.Windows.Controls.Image.OpacityProperty, da);
        }
Exemplo n.º 2
0
 private void ani_Completed(object sender, EventArgs e)
 {
     Logo.BeginAnimation(UIElement.OpacityProperty, _ani);
 }
Exemplo n.º 3
0
 private void InitializeFlashAnimation()
 {
     _ani.AutoReverse = true;
     _ani.Completed  += ani_Completed;
     Logo.BeginAnimation(UIElement.OpacityProperty, _ani);
 }