45 lines
1.5 KiB
C#
45 lines
1.5 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.Media;
|
|
|
|
namespace _29WxOrderWpf.UserControls
|
|
{
|
|
public class UcImageButton : Button
|
|
{
|
|
public UcImageButton()
|
|
{
|
|
}
|
|
|
|
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); }
|
|
}
|
|
}
|
|
}
|