summaryrefslogtreecommitdiff
path: root/Juick/Classes
diff options
context:
space:
mode:
Diffstat (limited to 'Juick/Classes')
-rw-r--r--Juick/Classes/BooleanToVisibilityConverter.cs21
1 files changed, 21 insertions, 0 deletions
diff --git a/Juick/Classes/BooleanToVisibilityConverter.cs b/Juick/Classes/BooleanToVisibilityConverter.cs
new file mode 100644
index 0000000..cd7e000
--- /dev/null
+++ b/Juick/Classes/BooleanToVisibilityConverter.cs
@@ -0,0 +1,21 @@
+using System;
+using System.Globalization;
+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();
+ }
+ }
+} \ No newline at end of file