Exemplo n.º 1
0
        void element_MouseEnter(object sender, MouseEventArgs e)
        {
            DependencyObject o = sender as DependencyObject;

            //implementation for static subscribing:
            //if (o != null)
            //{
            //    RichToolTip tooltip = GetContentTooltipWrapper(o);

            //    if (tooltip != null && (tooltip != lastShownPopup || tooltip._relatedObject != o))
            //    {
            //        tooltip.Show();
            //    }
            //}


            if (lastShownPopup != null && this != lastShownPopup)
            {
                lastShownPopup.Hide(true);
            }

            if (!IsShown() && this != lastShownPopup)
            {
                if (!hasParentWindow || parentWindow.IsActive)
                {
                    PrepareToShow(sender as UIElement);
                    Show(true);
                }
            }
        }