diff options
| author | Victoria Plitt <Victoria.Plitt@twine-s.com> | 2023-04-09 20:27:29 +0300 |
|---|---|---|
| committer | Victoria Plitt <Victoria.Plitt@twine-s.com> | 2023-04-09 20:27:29 +0300 |
| commit | 23f4bd3bb2f7ff5e0814555efe1c6115f32c49c4 (patch) | |
| tree | 9fc86e45ca156e736f5bc9b17605677f8f4ea0c2 /Software/Visual_Studio/PPC/Tango.PPC.UI/Converters/CollectionToCountConverter.cs | |
| parent | 24b3ae08ee6da1350f31541cf4966958cfde8a74 (diff) | |
| download | Tango-23f4bd3bb2f7ff5e0814555efe1c6115f32c49c4.tar.gz Tango-23f4bd3bb2f7ff5e0814555efe1c6115f32c49c4.zip | |
Notifications list, GUI changes.
Diffstat (limited to 'Software/Visual_Studio/PPC/Tango.PPC.UI/Converters/CollectionToCountConverter.cs')
| -rw-r--r-- | Software/Visual_Studio/PPC/Tango.PPC.UI/Converters/CollectionToCountConverter.cs | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Converters/CollectionToCountConverter.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/Converters/CollectionToCountConverter.cs new file mode 100644 index 000000000..b227aa5f8 --- /dev/null +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Converters/CollectionToCountConverter.cs @@ -0,0 +1,30 @@ +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; +using System.Windows.Data; + +namespace Tango.PPC.UI.Converters +{ + public class CollectionToCountConverter : IValueConverter + { + public object Convert(object value, Type targetType, object parameter, CultureInfo culture) + { + var collection = value as System.Collections.ICollection; + if (collection != null) + { + return collection.Count; + } + return 0; + } + + public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) + { + throw new NotImplementedException(); + } + } +} |
