Possible to programmatically add User Control to Silverlight Grid Column?

前端 未结 1 1577
清歌不尽
清歌不尽 2021-01-17 18:54

I have a User Control that I need to programmatically add to a Silverlight Grid t a specified Row and Column index. The requirements are such that I will need to insert at

相关标签:
1条回答
  • 2021-01-17 19:30

    Use Grid.Children.Add to add it to the grid, and Grid.SetRow and Grid.SetColumn to set the row and column index. E.g.

    Grid.SetRow(myControl, 3);
    Grid.SetColumn(myControl, 4);
    myGrid.Children.Add(myControl);
    
    0 讨论(0)
提交回复
热议问题