diff options
| author | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-06-24 18:39:34 +0300 |
|---|---|---|
| committer | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-06-24 18:39:34 +0300 |
| commit | 545f603c873cd026faf5560dae83da947f0a02a6 (patch) | |
| tree | 8022cfdbe21c6aefd68e0c7994d756e611183ef8 /Software/Visual_Studio/Tango.Touch/Controls/TouchToggleIconButton.cs | |
| parent | a34ee775bfe3001f562627963a4472e7df8e30b0 (diff) | |
| download | Tango-545f603c873cd026faf5560dae83da947f0a02a6.tar.gz Tango-545f603c873cd026faf5560dae83da947f0a02a6.zip | |
Working on PPC!!!!!!
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))); + + } +} |
