Here is the setup. I programatically add a Canvas, a Grid, and within that grid are two columns of checkboxes. I have the Canvas there for querying purposes (makes it easier). The problem is that after the method executes that does all this and the form
is displayed the canvas is visible, but the checkboxes aren't. When I set a breakpoint at the end of the method and check to make sure that all the Children are where they are supposed to be, they are all in their correct places.
For what it's worth here is the code for the method. I cannot, for the life of me, figure out why they are not being rendered. They are there there when breaking down the items children for each of the controls.
private void AddItemsToQuestion(Canvas pQuestionCanvas, XElement pQuestion)
List<XElement> pItems = (from c in pQuestion.Elements("Item")
if (pItems.Count <= 0) return;
int iNumberOfRows = (int)Math.Ceiling((double)pItems.Count / 2);
//get the question canvas name
Dictionary<string, object> pQuestionTag = ((Dictionary<string, object>)pQuestionCanvas.Tag);
string sQuestionName = pQuestionTag["Name"].ToString();
Canvas pItemsCanvas = new Canvas();
pItemsCanvas.Width = pQuestionCanvas.Width;
pItemsCanvas.Height = iNumberOfRows * 25;
View Complete Post