aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC/Tango.PPC.UI/Converters
diff options
context:
space:
mode:
authorVictoria Plitt <Victoria.Plitt@twine-s.com>2023-04-09 20:27:29 +0300
committerVictoria Plitt <Victoria.Plitt@twine-s.com>2023-04-09 20:27:29 +0300
commit23f4bd3bb2f7ff5e0814555efe1c6115f32c49c4 (patch)
tree9fc86e45ca156e736f5bc9b17605677f8f4ea0c2 /Software/Visual_Studio/PPC/Tango.PPC.UI/Converters
parent24b3ae08ee6da1350f31541cf4966958cfde8a74 (diff)
downloadTango-23f4bd3bb2f7ff5e0814555efe1c6115f32c49c4.tar.gz
Tango-23f4bd3bb2f7ff5e0814555efe1c6115f32c49c4.zip
Notifications list, GUI changes.
Diffstat (limited to 'Software/Visual_Studio/PPC/Tango.PPC.UI/Converters')
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/Converters/CollectionToCountConverter.cs30
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();
+ }
+ }
+}