Ejemplo n.º 1
0
        public SearchTreeViewItem()
        {
            Icon = new Icon("Resources/16x16/search.png");

            MouseDoubleClick += HandleDoubleClick;

            adorner = new ControlDragAdorner(ItemHeader, ControlDragAdornerPosition.All);
        }
Ejemplo n.º 2
0
        public FavoriteTreeViewItem()
        {
            Icon = new Icon("Resources/16x16/star_yellow.png");

            MouseDown        += Locate;
            MouseDoubleClick += Open;
            ToolTipOpening   += OpenToolTip;

            adorner = new ControlDragAdorner(ItemHeader, ControlDragAdornerPosition.All);
        }
Ejemplo n.º 3
0
        public PlaceHolderTreeViewItem([NotNull] DeviceTreeViewItem deviceTreeViewItem, [NotNull] string placeHolderName)
        {
            Assert.ArgumentNotNull(deviceTreeViewItem, nameof(deviceTreeViewItem));
            Assert.ArgumentNotNull(placeHolderName, nameof(placeHolderName));

            DeviceTreeViewItem = deviceTreeViewItem;
            PlaceHolderName    = placeHolderName;
            Text        = placeHolderName + " : Placeholder";
            Icon        = new Icon("Resources/16x16/bullet_square_grey.png");
            DataContext = this;

            _adorner = new ControlDragAdorner(ItemHeader, ControlDragAdornerPosition.All);

            Loaded += ControlLoaded;
        }
Ejemplo n.º 4
0
        public ItemTreeViewItem([NotNull] ItemHeader item) : base(item.ItemUri.Site)
        {
            Assert.ArgumentNotNull(item, nameof(item));

            Item    = item;
            Text    = item.Name;
            Icon    = item.Icon;
            ToolTip = string.Empty;
            adorner = new ControlDragAdorner(ItemHeader, ControlDragAdornerPosition.All);

            RefreshStatusIcons();

            ToolTipOpening += OpenToolTip;
            Notifications.RegisterItemEvents(this, renamed: ItemRenamed, deleted: ItemDeleted, serialized: ItemSerialized);
            Notifications.RegisterFieldEvents(this, FieldChanged);
        }
Ejemplo n.º 5
0
        public RenderingTreeViewItem([NotNull] DeviceTreeViewItem deviceTreeViewItem, [NotNull] RenderingItem rendering)
        {
            Assert.ArgumentNotNull(deviceTreeViewItem, nameof(deviceTreeViewItem));
            Assert.ArgumentNotNull(rendering, nameof(rendering));

            DeviceTreeViewItem = deviceTreeViewItem;
            Rendering          = rendering;
            Icon        = rendering.Icon;
            Text        = rendering.GetDisplayName() + " : " + rendering.Name;
            DataContext = this;

            Rendering.PropertyChanged += HandlePropertyChanged;

            adorner = new ControlDragAdorner(ItemHeader, ControlDragAdornerPosition.All);

            Loaded += ControlLoaded;
        }