public CellBindingsViewModel(CellBinder binder)
        {
            this.binder = binder;
            var binding = this.binder.Bindings.FirstOrDefault(b => b.PropertyName == "Value");

            if (binding != null)
            {
                this.ValueBindingExpression = binding.Expression;
                this.ValueBindingType       = binding.Type;
            }

            binding = this.binder.Bindings.FirstOrDefault(b => b.PropertyName == "Type");

            if (binding != null)
            {
                this.TypeBndingExpression = binding.Expression;
                this.TypeBindingType      = binding.Type;
            }
        }
 internal void SetBinder(CellBinder binder)
 {
     this.DataContext = new CellBindingsViewModel(binder);
 }
예제 #3
0
 public CellBindingsEditorWindow(CellBinder binder)
 {
     InitializeComponent();
     this.Editor.SetBinder(binder);
 }