Application state after waking from Power.Sleep()

I recently purchased a FEZ Portal and I have a few question centered around resuscitating an application after putting the device to sleep. Consider this simple program below which is just using the display, the touch inputs, and having a simple screen with gradient drawn on it. There are two threads, one for monitoring interactions and reset the timeout timer, and the other for blinking the FEZ Portal onboard LED.

Questions:

  1. What is the state of your application during sleep()?
  2. What is the proper sequence needed to resuscitate the application, IE redrawing the screen controls, events, etc?

My observations:
After the application received a touch event while sleeping, it wakes up and reconstruct the Program (inherited from Application) class, however the screen does not gets redrawn. Also after a few sleep and wake up routines that application becomes unresponsive and needing to do a hard reset (I am assuming it is because I am not properly cleaning up some resources).

using GHIElectronics.TinyCLR.Devices.Display;
using GHIElectronics.TinyCLR.Devices.Gpio;
using GHIElectronics.TinyCLR.Devices.I2c;
using GHIElectronics.TinyCLR.Drivers.FocalTech.FT5xx6;
using GHIElectronics.TinyCLR.Native;
using GHIElectronics.TinyCLR.Pins;
using GHIElectronics.TinyCLR.UI;
using GHIElectronics.TinyCLR.UI.Controls;
using GHIElectronics.TinyCLR.UI.Media;
using System;
using System.Collections;
using System.Diagnostics;
using System.Text;
using System.Threading;

namespace LynkController
{
    class Program : Application
    {
        //Entry point to the application
        static void Main()
        {

            var displayController = GHIElectronics.TinyCLR.Devices.Display.DisplayController.GetDefault();
            var displayControllerSettings = new GHIElectronics.TinyCLR.Devices.Display.ParallelDisplayControllerSettings
            {
                // 480x272
                Width = 480,
                Height = 272,
                DataFormat = GHIElectronics.TinyCLR.Devices.Display.DisplayDataFormat.Rgb565,
                PixelClockRate = 10000000,
                PixelPolarity = false,
                DataEnablePolarity = false,
                DataEnableIsFixed = false,
                HorizontalFrontPorch = 2,
                HorizontalBackPorch = 2,
                HorizontalSyncPulseWidth = 41,
                HorizontalSyncPolarity = false,
                VerticalFrontPorch = 2,
                VerticalBackPorch = 2,
                VerticalSyncPulseWidth = 10,
                VerticalSyncPolarity = false,
            };
            displayController.SetConfiguration(displayControllerSettings);
            displayController.Enable();

            //Create the UI portion of the application
            var program = new Program(displayController);
            var window = new Window()
            {
                Background = new GHIElectronics.TinyCLR.UI.Media.LinearGradientBrush(Colors.White, Colors.Yellow),
                Child = new Canvas() { Width = 480, Height = 272 }
            };
            //Run the UI. This prevents the main thread from exiting
            program.Run(window);

        }

        private FT5xx6Controller _ft5xx6Controller;
        private int _touches;
        private int _sleepAfter;
        const int SLEEP_TIMEOUT = 30;
        private static GpioPin backLight;
        private GpioPin _led;

        public Program(DisplayController displayController) : base(displayController)
        {


            _touches = 0;
            _sleepAfter = SLEEP_TIMEOUT;

            backLight = GpioController.GetDefault().OpenPin(GHIElectronics.TinyCLR.Pins.SC20260.GpioPin.PA15);
            backLight.SetDriveMode(GpioPinDriveMode.Output);
            backLight.Write(GpioPinValue.High);
            backLight.Write(GpioPinValue.High);


            InitializeTouch();

            WaitToSleep();

            _led = GpioController.GetDefault().OpenPin(GHIElectronics.TinyCLR.Pins.SC20260.GpioPin.PB0);
            _led.SetDriveMode(GpioPinDriveMode.Output);

            BlinkUserLED();

        }

        private void BlinkUserLED()
        {
            //For blinks onboard LED on PB0
            new Thread(() =>
            {
                while (true)
                {
                    _led.Write(_led.Read() == GpioPinValue.Low ? GpioPinValue.High : GpioPinValue.Low);
                    Debug.WriteLine($"Hello");
                    Thread.Sleep(1000);
                }

            }).Start();
        }

        private void WaitToSleep()
        {
            //This thread monitors interactions with Fez Portal, if not actively being used puts the device to sleep.
            new Thread(() =>
            {
                while (true)
                {
                    var bs = backLight.Read();
                    if (bs == GpioPinValue.Low)
                        backLight.Write(GpioPinValue.High); //Ensures the display backlight is on

                    if (_touches <= 0)
                    {
                        _touches = 0;
                        if (_sleepAfter > 0)
                        {
                            _sleepAfter--;
                            if (_sleepAfter == 0)
                            {
                                backLight.Write(GpioPinValue.Low);
                                _led.Write(GpioPinValue.Low);
                                Power.Sleep();
                            }
                        }
                        Debug.WriteLine($"Test {_touches} - {_sleepAfter}");
                    }
                    Thread.Sleep(1000);
                }
            }).Start();
        }



        private void InitializeTouch()
        {
            var i2cController = I2cController.FromName(SC20260.I2cBus.I2c1);
            var settings = new I2cConnectionSettings(0x38)
            {
                BusSpeed = 100000,
                AddressFormat = I2cAddressFormat.SevenBit,
            };
            var i2cDevice = i2cController.GetDevice(settings);
            var interrupt = GpioController.GetDefault().OpenPin(SC20260.GpioPin.PG9);
            _ft5xx6Controller = new FT5xx6Controller(i2cDevice, interrupt);
            _ft5xx6Controller.TouchDown += Ft5xx6Controller_TouchDown;
            _ft5xx6Controller.TouchUp += Ft5xx6Controller_TouchUp;
        }

        private void Ft5xx6Controller_TouchUp(FT5xx6Controller sender, TouchEventArgs e)
        {
            this.InputProvider.RaiseTouch(e.X, e.Y, GHIElectronics.TinyCLR.UI.Input.TouchMessages.Up, System.DateTime.Now);
            _touches--;
            _sleepAfter = SLEEP_TIMEOUT;
        }

        private void Ft5xx6Controller_TouchDown(FT5xx6Controller sender, TouchEventArgs e)
        {
            this.InputProvider.RaiseTouch(e.X, e.Y, GHIElectronics.TinyCLR.UI.Input.TouchMessages.Down, System.DateTime.Now);
            _touches++;
        }