diff options
| author | Shlomo Hecht <shlomo@twine-s.com> | 2018-06-24 19:13:33 +0300 |
|---|---|---|
| committer | Shlomo Hecht <shlomo@twine-s.com> | 2018-06-24 19:13:33 +0300 |
| commit | a27ef72084d844ef703aaa9b1c6f4ec032ca182e (patch) | |
| tree | 6899419d1dbce9e5509f7eec3c0415a3de232464 /Software/Visual_Studio/Tango.Touch/Controls/TouchToggleIconButton.cs | |
| parent | 7e77e5877a6ab6a03c672199fd3edbe9395e4c45 (diff) | |
| parent | 545f603c873cd026faf5560dae83da947f0a02a6 (diff) | |
| download | Tango-a27ef72084d844ef703aaa9b1c6f4ec032ca182e.tar.gz Tango-a27ef72084d844ef703aaa9b1c6f4ec032ca182e.zip | |
Merge branch 'master' of https://twinetfs.visualstudio.com/Tango/_git/Tango
Diffstat (limited to 'Software/Visual_Studio/Tango.Touch/Controls/TouchToggleIconButton.cs')
| -rw-r--r-- | Software/Visual_Studio/Tango.Touch/Controls/TouchToggleIconButton.cs | 60 |
1 files changed, 60 insertions, 0 deletions
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))); + + } +} |
