开发者

Custom DataGrid Silverlight

I'm writing custom DataGrid control. I have one collection of column headers and other collection of rows, which has collection of cells itself. I want all the cells in the column be the same width (the width of the widest cell). How can i do it?

Solution: Every cell knows the column which keep it. In cell's OnApplyTemplate i use Measure and assign the maximum between column's and cell's width to the colunm. When the whole DataGrid is loaded, i iterate through the cells of each row and assign the width of the c开发者_C百科olumn to each cell.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜