summaryrefslogtreecommitdiff
path: root/Juick/Classes/BooleanToVisibiltyConverter.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Juick/Classes/BooleanToVisibiltyConverter.cs')
-rw-r--r--Juick/Classes/BooleanToVisibiltyConverter.cs24
1 files changed, 24 insertions, 0 deletions
diff --git a/Juick/Classes/BooleanToVisibiltyConverter.cs b/Juick/Classes/BooleanToVisibiltyConverter.cs
new file mode 100644
index 0000000..679cc3f
--- /dev/null
+++ b/Juick/Classes/BooleanToVisibiltyConverter.cs
@@ -0,0 +1,24 @@
+using System;
+using System.Collections.Generic;
+using System.Globalization;
+using System.Linq;
+using System.Text;
+using System.Windows;
+using System.Windows.Data;
+
+namespace Juick.Classes
+{
+ public class BooleanToVisibiltyConverter : IValueConverter
+ {
+ public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
+ {
+ var visible = (bool) value;
+ return visible ? Visibility.Visible : Visibility.Collapsed;
+ }
+
+ public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
+ {
+ throw new NotImplementedException();
+ }
+ }
+}