开发者

Binding to Grid.columndefinition with MVVM

I would like to define the number of column of my silverlight 3 Grid with DataBinding.

How can I do this ?

With code behind, I would have done something similar to 开发者_JAVA技巧that :

foreach (MyObject o in MyObjectList)
{
       grid.ColumnDefinitions.Add(
                new ColumnDefinition() { Width = new GridLength(o.Length, GridUnitType.Star) });
}

But, I would like to try to follow the MVVM pattern and avoid this.

Thanks in advance for any help.

Best regards

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜