--- /dev/null
+using System;
+using System.Collections.Generic;
+using System.Globalization;
+using System.Linq;
+using System.Text;
+using System.Windows;
+using System.Windows.Data;
+
+namespace Pithos.Client.WPF.Converters
+{
+ /// <summary>
+ /// Returns Visible if a string value contains data, Hidden otherwise
+ /// </summary>
+ public class EmptyToVisibilityConverter:IValueConverter
+ {
+ public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
+ {
+ var stringValue = value as string;
+
+ if (String.IsNullOrWhiteSpace(stringValue))
+ return Visibility.Hidden;
+ return Visibility.Visible;
+ }
+
+ public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
+ {
+ throw new NotImplementedException();
+ }
+ }
+}