Ejemplo n.º 1
0
        internal void SelectItem(object target)
        {
            ElementTreeItem node       = _root.FindNode(target);
            Visual          rootVisual = _root.MainVisual;

            if (node == null)
            {
                Visual visual = target as Visual;
                if (visual != null && rootVisual != null)
                {
                    // ensure that the visual is contained within the subtree of the _root element
                    if (!visual.IsDescendantOf(rootVisual))
                    {
                        _root = new VisualItem(PresentationSource.FromVisual(visual).RootVisual, null);
                    }
                }

                _root.Reload();
                _root.UpdateVisualChildrenCount();
                node = _root.FindNode(target);

                Filter = _filter;
            }
            if (node != null)
            {
                SelectedItem = node;
            }
        }
Ejemplo n.º 2
0
        private void Load(object rootTarget)
        {
            _filtered.Clear();

            _root = ElementTreeItem.Construct(rootTarget, null);
            _root.Reload();
            _root.UpdateVisualChildrenCount();

            Filter = _filter;
        }
Ejemplo n.º 3
0
        private void Refresh()
        {
            object currentTarget = (SelectedItem != null) ? SelectedItem.Target : null;

            _filtered.Clear();

            _root = ElementTreeItem.Construct(_rootObject, null);
            _root.Reload();
            _root.UpdateVisualChildrenCount();

            if (currentTarget != null)
            {
                SelectItem(currentTarget);
            }

            Filter = _filter;
        }
Ejemplo n.º 4
0
        private void Refresh()
        {
            object currentTarget = (SelectedItem != null) ? SelectedItem.Target : null;

            _filtered.Clear();

            _root = ElementTreeItem.Construct(_rootObject, null);
            _root.Reload();
            _root.UpdateVisualChildrenCount();

            if (currentTarget != null)
            {
                SelectItem(currentTarget);
            }

            Filter = _filter;
        }
Ejemplo n.º 5
0
        private void Load(object rootTarget)
        {
            _filtered.Clear();

            _root = ElementTreeItem.Construct(rootTarget, null);
            _root.Reload();
            _root.UpdateVisualChildrenCount();

            Filter = _filter;
        }