CAD二次开发 .NET Ribbon按钮如何实现鼠标悬停切换图标,鼠标离开切换原始图标

using System;
using System.Windows;
using System.Windows.Media.Imaging;
using Autodesk.AutoCAD.ApplicationServices;
using Autodesk.AutoCAD.Runtime;
using Autodesk.Windows;
using AcadApp = Autodesk.AutoCAD.ApplicationServices.Application;
using WinApp = System.Windows.Application;
namespace Ribbons
{
    public class Ribbons
    {
        RibbonButton buttonLine;

        //调用资源字典
        ResourceDictionary resourceDictionary=(ResourceDictionary)WinApp.LoadComponent(new Uri("/Ribbons;component/RibbonDictionary.xaml", UriKind.Relative));
        [CommandMethod("AddRibbon")]
        public void AddRibbon()
        {
            RibbonControl control=ComponentManager.Ribbon;//获取Ribbon界面
            RibbonTab tab=new RibbonTab();//创建选项卡
            tab.Title = "C# Ribbon";//设置选项卡的标题
            tab.Id = "ID_TabMyRibbon";//设置选项卡的AutoCAD标识符
            control.Tabs.Add(tab);//将选项卡添加到Ribbon界面中
            addPanel(tab);//为选项卡添加Ribbon面板
            tab.IsActive = true;//设置当前活动选项卡
        }
        private void addPanel(RibbonTab tab)
        {
            //创建RibbonPanelSource对象,用来加入Ribbon元素(如按钮)
            RibbonPanelSource sourcePanel=new RibbonPanelSource();
            sourcePanel.Title = "演示";//Ribbon面板的标题
            RibbonPanel ribPanel=new RibbonPanel();//创建Ribbon面板
            ribPanel.Source = sourcePanel;//设置Ribbon面板的内容
            tab.Panels.Add(ribPanel);//将Ribbon面板添加到选项卡中
            buttonLine=new RibbonButton();//创建按钮
            buttonLine.Name = "直线";//按钮名称 
            buttonLine.Text = "直线";//按钮显示的文字
            buttonLine.ShowImage = true;//按钮显示图像
            buttonLine.ShowText = true;//按钮显示文字
            //设置按钮的大小图像
            buttonLine.Image = resourceDictionary["LineImage"] as BitmapImage;
            buttonLine.LargeImage = resourceDictionary["LineImage"] as BitmapImage;
            buttonLine.Size = RibbonItemSize.Large;//以大图像的形式表示按钮
            //按钮文字和图像的方向为竖直
            buttonLine.Orientation = System.Windows.Controls.Orientation.Vertical;
            buttonLine.CommandParameter = "Line ";//设置按钮的命令参数

            buttonLine.MouseEntered += ButtonLine_MouseEntered;

            //设置按钮的命令处理程序
            buttonLine.CommandHandler = new RibbonCommandHandler();
            sourcePanel.Items.Add(buttonLine);
        }

        private void ButtonLine_MouseEntered(object sender, EventArgs e)
        {
            buttonLine.Image = resourceDictionary["LineImage1"] as BitmapImage;
            buttonLine.LargeImage = resourceDictionary["LineImage1"] as BitmapImage;
        }

        public class RibbonCommandHandler : System.Windows.Input.ICommand
        {
            public bool CanExecute(object parameter)
            {
                return true;//确定此命令可以在其当前状态下执行
            }
            //当出现影响是否应执行该命令的更改时发生
            public event EventHandler CanExecuteChanged;

            public void Execute(object parameter)
            {
                //获取发出命令的按钮对象
                RibbonButton button = parameter as RibbonButton;
                //如果发出命令的不是按钮或按钮未定义命令参数,则返回
                if (button == null || button.CommandParameter == null) return;
                //根据按钮的命令参数,执行对应的AutoCAD命令
                Document doc = AcadApp.DocumentManager.MdiActiveDocument;
                doc.SendStringToExecute(button.CommandParameter.ToString(), true, false, true);
            }
        }
    }
}

 

 

 

 

请问该如何实现,通过RibbonButton的 MouseEntered、MouseLeft 事件,实现Ribbon按钮的鼠标悬停切换图标,鼠标离开切换原始图标的操作?