public EventDetail(Events.Event e)
        {
            InitializeComponent();
            this.e  = e;
            origFav = e.Fav;
            Events.Program prog = e.prog;
            chckFav.IsChecked           = this.e.Fav;
            grdTitle.Background         = Events.Categories[prog.category].colour;
            grdTitle.Background.Opacity = opacity;
            txtTitle.Text               = prog.name;
            txtTitle.Background         = new SolidColorBrush(Colors.White);
            txtTitle.Background.Opacity = 0.0;
            //vbText.Height = Height - (txtTitle.Height + txtInfo.Height);
            //TextBlock txtDesc = new TextBlock() {Background = textColour, Width = this.Width};
            txtDesc.Background         = textColour;
            txtDesc.Background.Opacity = opacity;
            txtDesc.Text = Events.Descs[prog.day][prog.id];
            string content = "";

            if (prog.day == 0)
            {
                content = "Friday, September 21st ";
            }
            else if (prog.day == 1)
            {
                content = "Friday, September 22nd ";
            }
            else
            {
                content = "Friday September 23rd";
            }
            content += prog.start < 26 ? (prog.start / 2) : (prog.start / 2) % 12;
            content += (prog.start % 2) == 0 ? ":00" : ":30";
            content += (prog.start < 24 || prog.start >= 48) ? "AM-" : "PM-";
            content += (prog.start + prog.length) < 26 ? ((prog.start + prog.length) / 2) : ((prog.start + prog.length) / 2) % 12;
            //content += (prog.start + prog.length) / 2;
            content     += ((prog.start + prog.length) % 2) == 0 ? ":00" : ":30";
            content     += ((prog.start + prog.length) < 24 || (prog.start + prog.length) >= 48) ? "AM" : "PM";
            txtTime.Text = content;

            txtLocation.Text = prog.location;
            if (prog.speakers.Length > 0)
            {
                txtSpeaker.Text = "Speakers: ";
                for (int i = 0; i < prog.speakers.Length - 1; i++)
                {
                    txtSpeaker.Text += prog.speakers[i] + ", ";
                }
                txtSpeaker.Text  += prog.speakers[prog.speakers.Length - 1];
                txtSpeaker.Height = 25;
            }
            else
            {
                txtSpeaker.Height = 0;
            }
            UpdateLayout();

            /*RowDefinition row = grdContent.RowDefinitions[0];
             * while (row.ActualHeight < 500)
             * {
             *  txtDesc.FontSize += 0.25;
             *  while (row.ActualHeight > 600)
             *  {
             *      txtDesc.FontSize -= 0.25;
             *  }
             * }*/
            //txtDesc.FontSize += 10;
            //grd.RowDefinitions[1].Height = new GridLength(txtDesc.Height);
            //Grid.SetRow(txtDesc, 1);
            //grd.Children.Add(txtDesc);
        }
 private void NavEventDetails(object sender, Events.Event e)
 {
     this.main_frame.Navigate(new EventDetail(e));
     ResetButtonColours();
 }