Mega Code Archive
DispatcherTimer set up
//File:Window.xaml.cs
using System;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Media;
using System.Windows.Shapes;
using System.Windows.Media.Animation;
namespace _360Timer
{
public partial class Window1 : Window
{
System.Windows.Threading.DispatcherTimer frameTimer;
public Window1()
{
InitializeComponent();
frameTimer = new System.Windows.Threading.DispatcherTimer();
frameTimer.Tick += OnFrame;
frameTimer.Interval = TimeSpan.FromSeconds(1.0 / 60.0);
frameTimer.Start();
this.Show();
}
private void OnFrame(object sender, EventArgs e)
{
}
}
}