Im writting an Application for Win8 with C# and Xaml.
I have an Control with an Control-Template, i can add Components statically to the Control-Template.
But when i add Them in the Code Behind like this:
TextBlock Text = new TextBlock();
Text.Name = "Text" + rand.Next(999999);
Text.Text = info.Name;
The Textblock is not shown when i add the Control to an Page.
You need to add the newly created controls to the hosting control. e.g., if you have a stackpanel you can add the textbox to it with something like
note : untested, but I’m pretty sure the syntax is right