From 545f603c873cd026faf5560dae83da947f0a02a6 Mon Sep 17 00:00:00 2001 From: Roy Ben-Shabat Date: Sun, 24 Jun 2018 18:39:34 +0300 Subject: Working on PPC!!!!!! --- .../Tango.Touch/Controls/TouchToggleIconButton.cs | 60 ++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 Software/Visual_Studio/Tango.Touch/Controls/TouchToggleIconButton.cs (limited to 'Software/Visual_Studio/Tango.Touch/Controls/TouchToggleIconButton.cs') diff --git a/Software/Visual_Studio/Tango.Touch/Controls/TouchToggleIconButton.cs b/Software/Visual_Studio/Tango.Touch/Controls/TouchToggleIconButton.cs new file mode 100644 index 000000000..8deb6b527 --- /dev/null +++ b/Software/Visual_Studio/Tango.Touch/Controls/TouchToggleIconButton.cs @@ -0,0 +1,60 @@ +using FontAwesome.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.Touch.Controls +{ + public class TouchToggleIconButton : ToggleButton + { + static TouchToggleIconButton() + { + DefaultStyleKeyProperty.OverrideMetadata(typeof(TouchToggleIconButton), new FrameworkPropertyMetadata(typeof(TouchToggleIconButton))); + } + + public FontAwesomeIcon Icon + { + get { return (FontAwesomeIcon)GetValue(IconProperty); } + set { SetValue(IconProperty, value); } + } + public static readonly DependencyProperty IconProperty = + DependencyProperty.Register("Icon", typeof(FontAwesomeIcon), typeof(TouchToggleIconButton), new PropertyMetadata(FontAwesomeIcon.Check)); + + public FontAwesomeIcon CheckedIcon + { + get { return (FontAwesomeIcon)GetValue(CheckedIconProperty); } + set { SetValue(CheckedIconProperty, value); } + } + public static readonly DependencyProperty CheckedIconProperty = + DependencyProperty.Register("CheckedIcon", typeof(FontAwesomeIcon), typeof(TouchToggleIconButton), new PropertyMetadata(FontAwesomeIcon.Close)); + + public Brush CheckedForeground + { + get { return (Brush)GetValue(CheckedForegroundProperty); } + set { SetValue(CheckedForegroundProperty, value); } + } + public static readonly DependencyProperty CheckedForegroundProperty = + DependencyProperty.Register("CheckedForeground", typeof(Brush), typeof(TouchToggleIconButton), new PropertyMetadata(null)); + + public CornerRadius CornerRadius + { + get { return (CornerRadius)GetValue(CornerRadiusProperty); } + set { SetValue(CornerRadiusProperty, value); } + } + public static readonly DependencyProperty CornerRadiusProperty = + DependencyProperty.Register("CornerRadius", typeof(CornerRadius), typeof(TouchToggleIconButton), new PropertyMetadata(default(CornerRadius))); + + } +} -- cgit v1.3.1