private DataGridColumn CreateColumn([NotNull] ProjectPropertyName projectPropertyName) { Contract.Requires(projectPropertyName != null); var column = new DataGridTextColumn { Header = new TextBlock { Text = projectPropertyName.DisplayName }, Width = new DataGridLength(1, DataGridLengthUnitType.Star), Binding = new Binding(@"PropertyValue[" + projectPropertyName.Name + @"]") { Mode = BindingMode.TwoWay }, }; column.EnableMultilineEditing(); column.SetValue(DataGridFilterColumn.TemplateProperty, AssociatedObject?.FindResource(ResourceKeys.MultipleChoiceFilterTemplate)); column.SetValue(ProjectPropertyNameProperty, projectPropertyName); column.SetValue(PropertyNameProperty, projectPropertyName.Name); _columnsCreatedThrottle.Tick(); return(column); }
private static DataGridColumn CreateColumn(ProjectPropertyName projectPropertyName) { Contract.Requires(projectPropertyName != null); var column = new DataGridTextColumn { Header = new TextBlock { Text = projectPropertyName.DisplayName }, Width = new DataGridLength(1, DataGridLengthUnitType.Star), Binding = new Binding(@"PropertyValue[" + projectPropertyName.Name + @"]") { Mode = BindingMode.TwoWay } }; column.EnableMultilineEditing(); column.SetValue(ProjectConfigurationProperty, projectPropertyName); return(column); }