public void ClearDataSchemaItemFilter() { if (this.root != null) { this.ClearDataSchemaItemFilter(this.root); } this.lastFilter = (DataSchemaItemFilter)null; }
public void SetDataSchemaItemFilter(DataSchemaItemFilter filter) { this.lastFilter = filter; if (this.root == null) { return; } this.SetDataSchemaItemFilter(this.root); }
public DataSourceBindingSourceModel(DataPanelModel model, DataSchemaItemFilter dataSchemaFilter) { this.model = model; this.Model.PropertyChanged += new PropertyChangedEventHandler(this.Model_PropertyChanged); this.dataSchemaFilter = dataSchemaFilter; this.dataSources = new ObservableCollection <DataSourceItem>(); this.dataSourcesView = CollectionViewSource.GetDefaultView((object)this.dataSources); this.dataSourcesView.CurrentChanged += new EventHandler(this.DataSourcesView_CurrentChanged); this.RefreshDataSources(); }
public ElementPropertyBindingSourceModel(SceneNode targetElement, DataSchemaItemFilter dataSchemaFilter) { this.selectionContext = (SelectionContext <ElementNode>) new SingleSelectionContext <ElementNode>(); this.selectionContext.PropertyChanged += new PropertyChangedEventHandler(this.selectionContext_PropertyChanged); this.root = this.BuildTree((SceneElement)targetElement.ViewModel.ActiveEditingContainer, targetElement.ViewModel.BindingEditor); this.root.IsExpanded = true; this.dataSchemaFilter = dataSchemaFilter; ElementNode elementNode = this.root.FindDescendantSceneNode(targetElement) ?? (ElementNode)this.root; if (!elementNode.IsSelectable) { return; } elementNode.ExpandAncestors(); this.selectionContext.SetSelection(elementNode); }
public void SetFilter(DataSchemaItemFilter filter) { this.filter = filter; this.RefreshFilter(); }
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; }