Main Site Documentation

Simple attempt


#1

I’m trying to add a simply textblock, but there is something wrong.

This is my code:


public static void Main()
{
	TextBlock textBlock = new TextBlock("Nombre" + "_textBlock", 255, 0, 0, 300, 100);
	textBlock.Text = "I'm the title bar.";
	textBlock.FontColor = Colors.Blue;
	textBlock.TextAlign = HorizontalAlignment.Center;
	textBlock.TextVerticalAlign = VerticalAlignment.Middle;
	
	Glide.FitToScreen = true;            
	Window window = new Window("Window", Glide.LCD.Width, Glide.LCD.Height);
	Glide.MainWindow = window;
	
	Thread.Sleep(Timeout.Infinite);
}

I can only see black screen. Any idea?


#2

Did you add the element to the window?


#3

I think no, this is all my code :-[

Ok. I need this:

window.AddChild(textBlock);