I have noticed an issuewith the use of the parameterless construction for Window.
Illustrated below:
using System;
using System.Threading;
using Microsoft.SPOT;
using GHIElectronics.NETMF.Hardware;
using GHIElectronics.NETMF.Glide;
using GHIElectronics.NETMF.Glide.Display;
using GHIElectronics.NETMF.Glide.UI;
namespace BasicTesting
{
public class Program
{
//static Window window;
public static void Main()
{
Window window;
#if true
// this works
window = new Window("main", 320, 240);
#else
// this results in a NullException when
// Glide.MainWindow = window; is executed
window = new Window();
window.Name = "main";
window.Width = 320;
window.Height = 240;
#endif
window.BackColor = Microsoft.SPOT.Presentation.Media.Color.White;
TextBlock tb = new TextBlock("tb1", 255, 50, 50, 50, 24);
tb.Text = "Testing";
window.AddChild(tb);
Glide.MainWindow = window;
Thread.Sleep(-1);
}
}
}