Example #1
0
        public ResourceCustomField AddCustomField(string fieldName, int fieldType)
        {
            var result = new ResourceCustomField {
                Name = fieldName, FieldType = fieldType
            };

            _resourceCustomFields.Add(result);
            return(result);
        }
 private static GridViewColumn CreateColumn(ResourceCustomField customField)
 {
     var template = new DataTemplate { DataType = typeof(string) };
     var fef = new FrameworkElementFactory(typeof(TextBlock));
     fef.SetBinding(TextBlock.TextProperty, new Binding("[" + customField.Name + "]") { StringFormat = customField.EditingFormat });
     template.VisualTree = fef;
     var c = new GridViewColumn { Header = customField.Name, CellTemplate = template };
     Presentation.Common.ListViewLM.ProportionalColumn.ApplyWidth(c, 1);
     return c;
 }
Example #3
0
 public ResourceCustomField AddCustomField(string fieldName, int fieldType)
 {
     var result = new ResourceCustomField { Name = fieldName, FieldType = fieldType };
     _resourceCustomFields.Add(result);
     return result;
 }