private static void CleanUp(FrameworkElement lb, UIElementAdorner ad)
        {
            if (!_Adorners.ContainsKey(lb))
                return;

            //ad.MouseLeave -= new MouseEventHandler(uea_MouseLeave);
            //ad.MouseDown -= lb_MouseDown;
            //ad.PreviewMouseDown -= lb_MouseDown;
            //ad.PreviewMouseLeftButtonUp -= new MouseButtonEventHandler(lb_MouseDown);
            //ad.PreviewMouseLeftButtonDown -= new MouseButtonEventHandler(lb_MouseDown);
            //ad.MouseLeftButtonUp -= new MouseButtonEventHandler(lb_MouseDown);
            //ad.MouseLeftButtonDown -= new MouseButtonEventHandler(lb_MouseDown);
            //ad.PreviewMouseRightButtonUp -= new MouseButtonEventHandler(uea_PreviewMouseRightButtonDown);
            //ad.PreviewMouseRightButtonDown -= new MouseButtonEventHandler(lb_MouseDown);
            //ad.MouseRightButtonUp -= new MouseButtonEventHandler(lb_MouseDown);
            //ad.MouseRightButtonDown -= new MouseButtonEventHandler(lb_MouseDown);
            _Adorners.Remove(lb);

            AdornerLayer layer = AdornerLayer.GetAdornerLayer(lb);
            if (layer == null)
                return;

            int del = GetAttachedAdorner(lb).DelayClose;

            if (del == 0)
            {
                layer.Remove(ad);
                ad.Dispose();
            }
            else
            {
                ////bool res = GetIsClosingAdorner(ad);

                //SetIsClosingAdorner(ad.Child, true);

                //res = GetIsClosingAdorner(ad);
                DispatcherTimer d = new DispatcherTimer( DispatcherPriority.Normal,  Dispatcher.CurrentDispatcher){ Interval=TimeSpan.FromMilliseconds(del)};
  
                EventHandler ev = null;
                ev = (o, e) => { layer.Remove(ad); d.Tick -= ev; d.Stop(); ad.Dispose(); };
                d.Tick += ev;
               
                d.Start();
            }

        }
        //static void lb_MouseDown(object sender, MouseButtonEventArgs e)
        //{
        //    Adorner ad = sender as Adorner;
        //    FrameworkElement fe = ad.AdornedElement as FrameworkElement;
        //    fe.RaiseEvent(e);
        //}

        private static void ListBox_MouseEnter(object sender, MouseEventArgs e)
        {
            // Check that we are hovering on a ListBoxItem
            FrameworkElement lb = sender as FrameworkElement;
            MouseOverArdornerInfo ct = GetAttachedAdorner(lb);

            if (ct == null)
                return;

            if (_Adorners.ContainsKey(lb))
                return;

            AdornerLayer layer = AdornerLayer.GetAdornerLayer(lb);

            ContentPresenter cp = new ContentPresenter();
            cp.ContentTemplate = ct.Template;

            Binding b = new Binding();
            b.Path = new PropertyPath("DataContext");
            b.Source = lb;
            b.Mode = BindingMode.OneWay;
            cp.SetBinding(ContentPresenter.ContentProperty, b);
            UIElementAdorner uea = new UIElementAdorner(lb) { Child = cp };

            //uea.OffsetLeft = ct.VerticalOffset;
            //uea.OffsetTop = ct.HorizontalOffset;

            layer.Add(uea);
            _Adorners.Add(lb, uea);

            //uea.MouseLeave += new MouseEventHandler(uea_MouseLeave);
            //uea.MouseDown += lb_MouseDown;
            //uea.PreviewMouseDown += lb_MouseDown;
            //uea.PreviewMouseLeftButtonUp += new MouseButtonEventHandler(lb_MouseDown);
            //uea.PreviewMouseLeftButtonDown += new MouseButtonEventHandler(lb_MouseDown);
            //uea.MouseLeftButtonUp += new MouseButtonEventHandler(lb_MouseDown);
            //uea.MouseLeftButtonDown += new MouseButtonEventHandler(lb_MouseDown);
            //uea.PreviewMouseRightButtonUp += new MouseButtonEventHandler(uea_PreviewMouseRightButtonDown);
            //uea.PreviewMouseRightButtonDown += new MouseButtonEventHandler(lb_MouseDown);
            //uea.MouseRightButtonUp += new MouseButtonEventHandler(lb_MouseDown);
            //uea.MouseRightButtonDown += new MouseButtonEventHandler(lb_MouseDown);

        }