diff options
| author | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-07-10 11:38:50 +0300 |
|---|---|---|
| committer | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-07-10 11:38:50 +0300 |
| commit | afd359b383a09f720d512dbf1f3bb6707dc4b83e (patch) | |
| tree | 950435d3dd35a268f44576330a2c9b0996ae97c2 /Software/Visual_Studio/Tango.SharedUI/Converters | |
| parent | 17edf0cd108fb4a27dade328eaa294d352909b8f (diff) | |
| download | Tango-afd359b383a09f720d512dbf1f3bb6707dc4b83e.tar.gz Tango-afd359b383a09f720d512dbf1f3bb6707dc4b83e.zip | |
Implemented job type picker dialog.
Implemented "native" touch listbox.
Diffstat (limited to 'Software/Visual_Studio/Tango.SharedUI/Converters')
| -rw-r--r-- | Software/Visual_Studio/Tango.SharedUI/Converters/EnumToXamlVectorConverter.cs | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/Software/Visual_Studio/Tango.SharedUI/Converters/EnumToXamlVectorConverter.cs b/Software/Visual_Studio/Tango.SharedUI/Converters/EnumToXamlVectorConverter.cs new file mode 100644 index 000000000..1ee506de8 --- /dev/null +++ b/Software/Visual_Studio/Tango.SharedUI/Converters/EnumToXamlVectorConverter.cs @@ -0,0 +1,26 @@ +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Linq; +using System.Reflection; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Data; +using Tango.Core.CustomAttributes; + +namespace Tango.SharedUI.Converters +{ + public class EnumToXamlVectorConverter : IValueConverter + { + public object Convert(object value, Type targetType, object parameter, CultureInfo culture) + { + FieldInfo fi = value.GetType().GetField(value.ToString()); + return fi.GetCustomAttribute<XamlVectorAttribute>().XamlVector; + } + + public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) + { + throw new NotImplementedException(); + } + } +} |
