Пример #1
0
        private void UserControl_Loaded(object sender, RoutedEventArgs e)
        {
            //设置图片
            strInFilePah  = System.IO.Path.Combine(strRootPath, "Image", "ShortCut_In.png");
            strOutFilePah = System.IO.Path.Combine(strRootPath, "Image", "ShortCut_Out.png");
            Background    = WPFImageHelper.GetImage(strOutFilePah);

            MouseLeftButtonDown += Item_Click;
            //tbkShortCut.MouseLeftButtonDown += Item_Click;
        }
Пример #2
0
 private void UserControl_MouseLeave(object sender, MouseEventArgs e)
 {
     Background = WPFImageHelper.GetImage(strOutFilePah);
 }
Пример #3
0
 private void UserControl_MouseEnter(object sender, MouseEventArgs e)
 {
     Background  = WPFImageHelper.GetImage(strInFilePah);
     this.Cursor = Cursors.Hand;
 }