aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.UI/Converters/CurrentUserVisibilityConverter.cs
diff options
context:
space:
mode:
authorLuke <luke.pulverenti@gmail.com>2013-02-20 17:10:49 -0800
committerLuke <luke.pulverenti@gmail.com>2013-02-20 17:10:49 -0800
commit845554722efaed872948a9e0f7202e3ef52f1b6e (patch)
tree534ab2d11fe4824ed303bb01e885b330631b657e /MediaBrowser.UI/Converters/CurrentUserVisibilityConverter.cs
parent2f142263f080f7b012a0ec2095d350ccf75b49b7 (diff)
parent14bbb6804718ef78a8118fe750896ba679e3b6cb (diff)
Merge pull request #1 from MediaBrowser/Repo
Repo
Diffstat (limited to 'MediaBrowser.UI/Converters/CurrentUserVisibilityConverter.cs')
-rw-r--r--MediaBrowser.UI/Converters/CurrentUserVisibilityConverter.cs26
1 files changed, 26 insertions, 0 deletions
diff --git a/MediaBrowser.UI/Converters/CurrentUserVisibilityConverter.cs b/MediaBrowser.UI/Converters/CurrentUserVisibilityConverter.cs
new file mode 100644
index 000000000..a5dd5013b
--- /dev/null
+++ b/MediaBrowser.UI/Converters/CurrentUserVisibilityConverter.cs
@@ -0,0 +1,26 @@
+using System;
+using System.Globalization;
+using System.Windows;
+using System.Windows.Data;
+
+namespace MediaBrowser.UI.Converters
+{
+ public class CurrentUserVisibilityConverter : IValueConverter
+ {
+ public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
+ {
+ if (App.Instance.ServerConfiguration == null || !App.Instance.ServerConfiguration.EnableUserProfiles)
+ {
+ return Visibility.Collapsed;
+ }
+
+ return value == null ? Visibility.Collapsed : Visibility.Visible;
+ }
+
+
+ public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
+ {
+ throw new NotImplementedException();
+ }
+ }
+}