private void InitializeColumn(CremaDataColumn dataColumn, ColumnBase column) { if (dataColumn.CremaType != null) { if (dataColumn.CremaType.IsFlag == true) { column.CellEditor = this.FindResource("CremaFlagTypeSelector") as CellEditor; } else { column.CellEditor = this.FindResource("CremaTypeSelector") as CellEditor; } SetCremaTypeMembers(column, dataColumn.CremaType.Members); } CremaDataTableItemControl.SetIsKey(column, dataColumn.IsKey); CremaDataTableItemControl.SetIsUnique(column, dataColumn.Unique); CremaDataTableItemControl.SetFieldType(column, dataColumn.DataType); CremaDataTableItemControl.SetTags(column, dataColumn.Tags); CremaDataTableItemControl.SetComment(column, dataColumn.Comment); CremaDataTableItemControl.SetReference(column, dataColumn); column.TitleTemplate = this.FindResource("Title_Template") as DataTemplate; if (dataColumn.DerivedTags.Color != null) { CremaDataTableItemControl.SetHasTagColor(column, true); column.SetValue(TextElement.ForegroundProperty, new BrushConverter().ConvertFrom(dataColumn.DerivedTags.Color)); } }
private static void SetValue(ColumnBase source, ColumnBase destination, DependencyProperty property) { Debug.Assert(source != null); Debug.Assert(destination != null); Debug.Assert(property != null); destination.SetValue(property, source.GetValue(property)); }
private static void RestoreLocalValue(Dictionary <DependencyProperty, object> store, ColumnBase column, DependencyProperty property) { Debug.Assert(store != null); Debug.Assert(column != null); Debug.Assert(property != null); object value; if (!store.TryGetValue(property, out value) || (value == DependencyProperty.UnsetValue)) { column.ClearValue(property); } else if (value is BindingBase) { BindingOperations.SetBinding(column, property, ( BindingBase )value); } else { column.SetValue(property, value); } }
private static void SetHasTagColor(ColumnBase obj, bool value) { obj.SetValue(HasTagColorPropertyKey, value); }
public static void SetTags(ColumnBase obj, TagInfo value) { obj.SetValue(TagsProperty, value); }
public static void SetFieldType(ColumnBase obj, Type value) { obj.SetValue(FieldTypeProperty, value); }
public static void SetIsUnique(ColumnBase obj, bool value) { obj.SetValue(IsUniqueProperty, value); }
public static void SetIsRowHeader(ColumnBase column, bool value) { column.SetValue(IsRowHeaderProperty, value); }
internal static void SetColumnsLayoutControl(ColumnBase obj, ColumnsLayoutControl value) { obj.SetValue(ColumnsLayoutControlProperty, value); }
public static void SetCremaTypeMembers(ColumnBase obj, IEnumerable value) { obj.SetValue(CremaTypeMembersProperty, value); }
public static void SetAutoSize(ColumnBase column, bool value) { column.SetValue(AutoSizeProperty, value); }
public static void SetTypes(ColumnBase obj, IEnumerable value) { obj.SetValue(TypesProperty, value); }
public static void SetIsBand(ColumnBase obj, bool value) { obj.SetValue(IsBandProperty, value); }
public static void SetRowSpan(ColumnBase obj, int value) { obj.SetValue(RowSpanProperty, value); }
public static void SetColumn(ColumnBase obj, int value) { obj.SetValue(ColumnProperty, value); }
public static void SetComment(ColumnBase obj, string value) { obj.SetValue(CommentProperty, value); }
public static void SetReference(ColumnBase obj, object value) { obj.SetValue(ReferenceProperty, value); }
public static void SetFontSizeHint(ColumnBase column, double value) { column.SetValue(FontSizeHintProperty, value); }
public static void SetAutoSizePadding(ColumnBase column, double value) { column.SetValue(AutoSizePaddingProperty, value); }
internal static void SetIsBottomColumn(ColumnBase obj, bool value) { obj.SetValue(IsBottomColumnProperty, value); }