Beispiel #1
0
    //This ensures the CellEditorContext is set on the Cell to avoid problems with RelativeSource causing undesired behaviors when ComboBox is used as default CellEditor
    internal void EnsureCellEditorContext()
    {
      ForeignKeyConfiguration configuration = null;

      Column parentColumn = this.ParentColumn as Column;

      if( parentColumn != null )
      {
        configuration = parentColumn.ForeignKeyConfiguration;
        CellEditorContext context = new CellEditorContext( this.ParentColumn, configuration );
        Cell.SetCellEditorContext( this, context );
      }
    }
Beispiel #2
0
 private static void SetCellEditorContext( DependencyObject obj, CellEditorContext value )
 {
   obj.SetValue( Cell.CellEditorContextPropertyKey, value );
 }