Microsoft.Windows.Controls.Ribbon.RibbonGalleryItem.OnMouseMove C# (CSharp) Method

OnMouseMove() protected method

This is the method that responds to the MouseEvent event.
protected OnMouseMove ( System.Windows.Input.MouseEventArgs e ) : void
e System.Windows.Input.MouseEventArgs Event arguments
return void
        protected override void OnMouseMove(MouseEventArgs e)
        {
            RibbonGallery gallery = RibbonGallery;
            if (gallery != null && gallery.DidMouseMove(e))
            {
                // Parent constrols such as RibbonComboBox don't want this item to acquire focus

                if (gallery.ShouldGalleryItemsAcquireFocus)
                {
                    Focus();
                }

                try
                {
                    gallery.HasHighlightChangedViaMouse = true;
                    IsHighlighted = true;
                }
                finally
                {
                    gallery.HasHighlightChangedViaMouse = false;
                }
                e.Handled = true;
            }

            base.OnMouseMove(e);
        }