using MaterialDesignThemes.Wpf; 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.Controls.Primitives; 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 Tango.FSE.Common.Controls { public class ToggleIconButton : ToggleButton { public PackIconKind CheckedIcon { get { return (PackIconKind)GetValue(CheckedIconProperty); } set { SetValue(CheckedIconProperty, value); } } public static readonly DependencyProperty CheckedIconProperty = DependencyProperty.Register("CheckedIcon", typeof(PackIconKind), typeof(ToggleIconButton), new PropertyMetadata(PackIconKind.Circle)); public PackIconKind UncheckedIcon { get { return (PackIconKind)GetValue(UncheckedIconProperty); } set { SetValue(UncheckedIconProperty, value); } } public static readonly DependencyProperty UncheckedIconProperty = DependencyProperty.Register("UncheckedIcon", typeof(PackIconKind), typeof(ToggleIconButton), new PropertyMetadata(PackIconKind.CircleOutline)); public Brush CheckedForeground { get { return (Brush)GetValue(CheckedForegroundProperty); } set { SetValue(CheckedForegroundProperty, value); } } public static readonly DependencyProperty CheckedForegroundProperty = DependencyProperty.Register("CheckedForeground", typeof(Brush), typeof(ToggleIconButton), new PropertyMetadata(null)); public Brush UncheckedForeground { get { return (Brush)GetValue(UncheckedForegroundProperty); } set { SetValue(UncheckedForegroundProperty, value); } } public static readonly DependencyProperty UncheckedForegroundProperty = DependencyProperty.Register("UncheckedForeground", typeof(Brush), typeof(ToggleIconButton), new PropertyMetadata(null)); public String CheckedText { get { return (String)GetValue(CheckedTextProperty); } set { SetValue(CheckedTextProperty, value); } } public static readonly DependencyProperty CheckedTextProperty = DependencyProperty.Register("CheckedText", typeof(String), typeof(ToggleIconButton), new PropertyMetadata(null)); public String UncheckedText { get { return (String)GetValue(UncheckedTextProperty); } set { SetValue(UncheckedTextProperty, value); } } public static readonly DependencyProperty UncheckedTextProperty = DependencyProperty.Register("UncheckedText", typeof(String), typeof(ToggleIconButton), new PropertyMetadata(null)); public TextAlignment TextAlignment { get { return (TextAlignment)GetValue(TextAlignmentProperty); } set { SetValue(TextAlignmentProperty, value); } } public static readonly DependencyProperty TextAlignmentProperty = DependencyProperty.Register("TextAlignment", typeof(TextAlignment), typeof(ToggleIconButton), new PropertyMetadata(TextAlignment.Center)); static ToggleIconButton() { DefaultStyleKeyProperty.OverrideMetadata(typeof(ToggleIconButton), new FrameworkPropertyMetadata(typeof(ToggleIconButton))); } } }