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 int GetDisplayIndex(ProjectPropertyName projectPropertyName, Configuration configuration) { if ((projectPropertyName == null) || (configuration == null)) { return(-1); } string[] propertyColumnOrder; if (!configuration.PropertyColumnOrder.TryGetValue(projectPropertyName.GroupName.Name, out propertyColumnOrder) || (propertyColumnOrder == null)) { return(-1); } var index = propertyColumnOrder.IndexOf(projectPropertyName.Name); return(index); }
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); }
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; }