Esempio n. 1
0
        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            _graphics = new XamlGraphics(LayoutRoot);

            var timer = new DispatcherTimer {
                Interval = TimeSpan.FromSeconds(1),
            };

            timer.Tick += delegate {
                Draw();
            };
            timer.Start();
        }
        private void PhoneApplicationPage_Loaded(object sender, RoutedEventArgs e)
        {
            //
            // Initialize the graphics context
            //
            _graphics = new XamlGraphics(LayoutRoot);

            //
            // Create a timer to refresh the clock
            //
            var timer = new DispatcherTimer {
                Interval = TimeSpan.FromSeconds(1),
            };

            timer.Tick += delegate {
                Draw();
            };
            timer.Start();
        }