public LiveToolTipAdorner(UIElement adornedElement, LiveToolTip tooltip)
            : base(adornedElement)
        {
            visualChildren = new VisualCollection(this);

            adornedElement.MouseLeave       += adornedElement_MouseLeave;
            adornedElement.MouseEnter       += adornedElement_MouseEnter;
            adornedElement.PreviewMouseMove += adornedElement_MouseMove;
            //FrameworkElement frAdornedElement = (FrameworkElement)adornedElement;
            //frAdornedElement.SizeChanged += frAdornedElement_SizeChanged;

            this.liveTooltip = tooltip;

            tooltip.Visibility = Visibility.Hidden;

            canvas.Children.Add(liveTooltip);
            AddLogicalChild(canvas);
            visualChildren.Add(canvas);

            Unloaded += LiveTooltipAdorner_Unloaded;
        }
Ejemplo n.º 2
0
		public LiveToolTipAdorner(UIElement adornedElement, LiveToolTip tooltip)
			: base(adornedElement)
		{
			visualChildren = new VisualCollection(this);

			adornedElement.MouseLeave += adornedElement_MouseLeave;
			adornedElement.MouseEnter += adornedElement_MouseEnter;
			adornedElement.PreviewMouseMove += adornedElement_MouseMove;
			//FrameworkElement frAdornedElement = (FrameworkElement)adornedElement;
			//frAdornedElement.SizeChanged += frAdornedElement_SizeChanged;

			this.liveTooltip = tooltip;

			tooltip.Visibility = Visibility.Hidden;

			canvas.Children.Add(liveTooltip);
			AddLogicalChild(canvas);
			visualChildren.Add(canvas);

			Unloaded += LiveTooltipAdorner_Unloaded;
		}