aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/FSE/Tango.FSE.Common/Controls/ToggleIconButton.cs
diff options
context:
space:
mode:
authorAvi Levkovich <avi@twine-s.com>2020-03-25 17:43:49 +0200
committerAvi Levkovich <avi@twine-s.com>2020-03-25 17:43:49 +0200
commitd29da53d6f71f45749c0ede5b4cd7281ed3a270e (patch)
treefd83afc7771c0f4f19c581e1cf407bcf7c14818b /Software/Visual_Studio/FSE/Tango.FSE.Common/Controls/ToggleIconButton.cs
parent0208e9f1800c044ec3bd002b7aa7fd00621c81be (diff)
downloadTango-d29da53d6f71f45749c0ede5b4cd7281ed3a270e.tar.gz
Tango-d29da53d6f71f45749c0ede5b4cd7281ed3a270e.zip
merge
Diffstat (limited to 'Software/Visual_Studio/FSE/Tango.FSE.Common/Controls/ToggleIconButton.cs')
-rw-r--r--Software/Visual_Studio/FSE/Tango.FSE.Common/Controls/ToggleIconButton.cs84
1 files changed, 84 insertions, 0 deletions
diff --git a/Software/Visual_Studio/FSE/Tango.FSE.Common/Controls/ToggleIconButton.cs b/Software/Visual_Studio/FSE/Tango.FSE.Common/Controls/ToggleIconButton.cs
new file mode 100644
index 000000000..a8d3f7f1a
--- /dev/null
+++ b/Software/Visual_Studio/FSE/Tango.FSE.Common/Controls/ToggleIconButton.cs
@@ -0,0 +1,84 @@
+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)));
+ }
+ }
+}