Silverlight, datagrid, autogenerated columns on modified column change cell visibility of content
问题 I have a form, it has a grid. I autogenerate the columns and tweak them as required: if (e.PropertyName == "id") { System.Windows.Style style = new Style(typeof(DataGridCell)); style.Setters.Add(new Setter(DataGridCell.ContentTemplateProperty, CreateBtnTemplate(30))); e.Column.CellStyle = style; } private static DataTemplate CreateBtnTemplate(int width) { string str = "<DataTemplate xmlns='http://schemas.microsoft.com/client/2007' >" //+ "<Button Tag='{Binding id}' Content='Respond' + "