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 BallanceTasEditor.Frontend.Widgets { public class IconButton : Button { static IconButton() { DefaultStyleKeyProperty.OverrideMetadata(typeof(IconButton), new FrameworkPropertyMetadata(typeof(IconButton))); } public string ButtonText { get { return (string)GetValue(ButtonTextProperty); } set { SetValue(ButtonTextProperty, value); } } // Using a DependencyProperty as the backing store for ButtonText. This enables animation, styling, binding, etc... public static readonly DependencyProperty ButtonTextProperty = DependencyProperty.Register("ButtonText", typeof(string), typeof(IconButton)); public ImageSource ButtonIcon { get { return (ImageSource)GetValue(ButtonIconProperty); } set { SetValue(ButtonIconProperty, value); } } // Using a DependencyProperty as the backing store for ButtonIcon. This enables animation, styling, binding, etc... public static readonly DependencyProperty ButtonIconProperty = DependencyProperty.Register("ButtonIcon", typeof(ImageSource), typeof(IconButton)); } }