WPF C# Tutorial

using System;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Shapes;
    public class Spiral : Window
    {
        Polyline poly;
        [STAThread]
        public static void Main()
        {
            Application app = new Application();
            app.Run(new Spiral());
        }
        public Spiral()
        {
            Canvas canv = new Canvas();
            canv.SizeChanged += CanvasOnSizeChanged;
            Content = canv;
        }
        void CanvasOnSizeChanged(object sender, SizeChangedEventArgs args)
        {
            Console.WriteLine(args.NewSize.Height);
        }
    }