private static void StoreLocalValue(Dictionary <DependencyProperty, object> store, ColumnBase column, DependencyProperty property) { Debug.Assert(store != null); Debug.Assert(column != null); Debug.Assert(property != null); var binding = BindingOperations.GetBindingBase(column, property); if (binding != null) { store[property] = binding; } else { var value = column.ReadLocalValue(property); if (value != DependencyProperty.UnsetValue) { store[property] = value; } else { store.Remove(property); } } }
public WorkingColumnWidth(ColumnBase column, double starValue, double columnStretchMinWidth) { bool unsetMinValue = (column.ReadLocalValue(ColumnBase.MinWidthProperty) == DependencyProperty.UnsetValue); this.Column = column; this.StarValue = starValue; m_maxWidth = column.MaxWidth; m_minWidth = column.MinWidth; m_columnStretchMinWidth = ((unsetMinValue) && (columnStretchMinWidth < m_maxWidth)) ? columnStretchMinWidth : -1d; }
public WorkingColumnWidth( ColumnBase column, double starValue, double columnStretchMinWidth ) { bool unsetMinValue = ( column.ReadLocalValue( ColumnBase.MinWidthProperty ) == DependencyProperty.UnsetValue ); this.Column = column; this.StarValue = starValue; m_maxWidth = column.MaxWidth; m_minWidth = column.MinWidth; m_columnStretchMinWidth = ( ( unsetMinValue ) && ( columnStretchMinWidth < m_maxWidth ) ) ? columnStretchMinWidth : -1d; }