public ElementBindingSourceNode(SceneElement element, SelectionContext <ElementNode> selectionContext)
     : base(element, selectionContext)
 {
     this.IsSelectable = true;
     this.schema       = SchemaManager.GetSchemaForType(element.TrueTargetType, element.DocumentNode);
     this.schemaItem   = new SchemaItem(this.schema);
     this.schemaItem.PropertyChanged += new PropertyChangedEventHandler(this.schemaItem_PropertyChanged);
     this.schemaItem.Root.IsExpanded  = true;
 }
Esempio n. 2
0
 public DataSchemaItem(DataSchemaNodePath nodePath, SchemaItem schemaItem, DataPanelModel model, SelectionContext <DataModelItemBase> selectionContext)
     : base(selectionContext)
 {
     this.nodePath           = nodePath;
     this.schemaItem         = schemaItem;
     this.model              = model;
     this.doubleClickCommand = (ICommand) new DelegateCommand(new DelegateCommand.SimpleEventHandler(this.OnDoubleClicked));
     this.PropertyChanged   += new PropertyChangedEventHandler(this.DataSchemaItem_PropertyChanged);
 }
Esempio n. 3
0
 public void Unhook()
 {
     if (this.schemaItem == null)
     {
         return;
     }
     this.schemaItem.PropertyChanged -= new PropertyChangedEventHandler(this.schemaItem_PropertyChanged);
     this.schemaItem = (SchemaItem)null;
 }
Esempio n. 4
0
        internal ExplicitDataContextBindingSourceModel(SceneNode targetElement, ReferenceStep targetProperty, DataSchemaItemFilter dataSchemaFilter)
        {
            this.schema     = SchemaManager.GetSchemaForDataSourceInfo(new DataContextEvaluator().Evaluate(targetElement, (IPropertyId)targetProperty, true).DataSource);
            this.schemaItem = new SchemaItem(this.schema);
            DataSchemaNodePath nodePathFromPath = this.schema.GetNodePathFromPath((string)null);

            if (nodePathFromPath != null && nodePathFromPath.Node != null)
            {
                this.schemaItem.SelectedItem = this.schemaItem.FindDataSchemaItemForNode(nodePathFromPath);
            }
            this.schemaItem.SetDataSchemaItemFilter(dataSchemaFilter);
            this.schemaItem.PropertyChanged += new PropertyChangedEventHandler(this.schemaItem_PropertyChanged);
            if (this.schema is EmptySchema || this.schemaItem.Root == null)
            {
                return;
            }
            this.schemaItem.Root.IsExpanded = true;
        }
Esempio n. 5
0
 internal void RefreshSchema(ISchema schema)
 {
     this.schemaItem      = new SchemaItem(schema, this.model, this.model.SelectionContext);
     this.activeChildItem = (DataSchemaItem)null;
     this.OnPropertyChanged((string)null);
 }
Esempio n. 6
0
 public DataSourceItem(ISchema schema, DataPanelModel model)
     : base(model.SelectionContext)
 {
     this.model      = model;
     this.schemaItem = new SchemaItem(schema, model, model.SelectionContext);
 }