56 lines
1.8 KiB
C#
56 lines
1.8 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using System.Windows;
|
|
using System.Windows.Controls;
|
|
using System.Windows.Data;
|
|
using System.Windows.Documents;
|
|
using System.Windows.Input;
|
|
using System.Windows.Media;
|
|
using System.Windows.Media.Imaging;
|
|
using System.Windows.Navigation;
|
|
using System.Windows.Shapes;
|
|
|
|
namespace _29WxOrderWpf.UserControls
|
|
{
|
|
/// <summary>
|
|
/// UcImageButton.xaml 的交互逻辑
|
|
/// </summary>
|
|
public partial class UcImageButton : Button
|
|
{
|
|
public UcImageButton()
|
|
{
|
|
InitializeComponent();
|
|
this.DataContext = this;
|
|
}
|
|
|
|
public static readonly DependencyProperty ButtonImageProperty = DependencyProperty.Register(
|
|
"ButtonImage", typeof(ImageSource), typeof(UcImageButton), null);
|
|
public ImageSource ButtonImage
|
|
{
|
|
get { return (ImageSource)GetValue(ButtonImageProperty); }
|
|
set { SetValue(ButtonImageProperty, value); }
|
|
}
|
|
|
|
public static readonly DependencyProperty MouseOverButtonImageProperty = DependencyProperty.Register(
|
|
"MouseOverButtonImage", typeof(ImageSource), typeof(UcImageButton), null);
|
|
|
|
public ImageSource MouseOverButtonImage
|
|
{
|
|
get { return (ImageSource)GetValue(MouseOverButtonImageProperty); }
|
|
set { SetValue(MouseOverButtonImageProperty, value); }
|
|
}
|
|
|
|
public static readonly DependencyProperty MousePressButtonImageProperty = DependencyProperty.Register(
|
|
"MousePressButtonImage", typeof(ImageSource), typeof(UcImageButton), null);
|
|
|
|
public ImageSource MousePressButtonImage
|
|
{
|
|
get { return (ImageSource)GetValue(MousePressButtonImageProperty); }
|
|
set { SetValue(MousePressButtonImageProperty, value); }
|
|
}
|
|
}
|
|
}
|