diff options
| author | Roy Ben Shabat <Roy.mail.net@gmail.com> | 2020-04-22 02:08:25 +0300 |
|---|---|---|
| committer | Roy Ben Shabat <Roy.mail.net@gmail.com> | 2020-04-22 02:08:25 +0300 |
| commit | 499e0a03bb41e2330a47ccca83e6e6dfe7c5a634 (patch) | |
| tree | 5d5d7866e33c1ae8a55cfa67be65848a25be7ab4 /Software/Visual_Studio/Tango.SharedUI/Converters | |
| parent | 97a784b6ce43960bdb92465b08f26d3562a4f202 (diff) | |
| download | Tango-499e0a03bb41e2330a47ccca83e6e6dfe7c5a634.tar.gz Tango-499e0a03bb41e2330a47ccca83e6e6dfe7c5a634.zip | |
Scripting.
Diffstat (limited to 'Software/Visual_Studio/Tango.SharedUI/Converters')
| -rw-r--r-- | Software/Visual_Studio/Tango.SharedUI/Converters/EnumToIntConverter.cs | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/Software/Visual_Studio/Tango.SharedUI/Converters/EnumToIntConverter.cs b/Software/Visual_Studio/Tango.SharedUI/Converters/EnumToIntConverter.cs new file mode 100644 index 000000000..43caff16c --- /dev/null +++ b/Software/Visual_Studio/Tango.SharedUI/Converters/EnumToIntConverter.cs @@ -0,0 +1,23 @@ +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Data; + +namespace Tango.SharedUI.Converters +{ + public class EnumToIntConverter : IValueConverter + { + public object Convert(object value, Type targetType, object parameter, CultureInfo culture) + { + return (int)value; + } + + public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) + { + return Enum.ToObject(targetType, value); + } + } +} |
