Example #1
0
 /// <summary>Called when the mouse enters a <see cref="T:System.Windows.Controls.ListBoxItem" />. </summary>
 /// <param name="e">The event data.</param>
 // Token: 0x0600515F RID: 20831 RVA: 0x0016D0F8 File Offset: 0x0016B2F8
 protected override void OnMouseEnter(MouseEventArgs e)
 {
     if (this.parentNotifyDraggedOperation != null)
     {
         this.parentNotifyDraggedOperation.Abort();
         this.parentNotifyDraggedOperation = null;
     }
     if (base.IsMouseOver)
     {
         ListBox parentListBox = this.ParentListBox;
         if (parentListBox != null && Mouse.LeftButton == MouseButtonState.Pressed)
         {
             parentListBox.NotifyListItemMouseDragged(this);
         }
     }
     base.OnMouseEnter(e);
 }
Example #2
0
        /// <summary>
        /// Called when IsMouseOver changes on this element.
        /// </summary>
        /// <param name="e"></param>
        protected override void OnMouseEnter(MouseEventArgs e)
        {
            // abort any drag operation we have queued.
            if (parentNotifyDraggedOperation != null)
            {
                parentNotifyDraggedOperation.Abort();
                parentNotifyDraggedOperation = null;
            }

            if (IsMouseOver)
            {
                ListBox parent = ParentListBox;

                if (parent != null && Mouse.LeftButton == MouseButtonState.Pressed)
                {
                    parent.NotifyListItemMouseDragged(this);
                }
            }
            base.OnMouseEnter(e);
        }