summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrakeWPF/Converters/OptionTabConverter.cs
diff options
context:
space:
mode:
Diffstat (limited to 'win/CS/HandBrakeWPF/Converters/OptionTabConverter.cs')
-rw-r--r--win/CS/HandBrakeWPF/Converters/OptionTabConverter.cs38
1 files changed, 38 insertions, 0 deletions
diff --git a/win/CS/HandBrakeWPF/Converters/OptionTabConverter.cs b/win/CS/HandBrakeWPF/Converters/OptionTabConverter.cs
new file mode 100644
index 000000000..9ad7111ec
--- /dev/null
+++ b/win/CS/HandBrakeWPF/Converters/OptionTabConverter.cs
@@ -0,0 +1,38 @@
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="OptionTabConverter.cs" company="HandBrake Project (http://handbrake.fr)">
+// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
+// </copyright>
+// <summary>
+// Controls display of tab pages
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace HandBrakeWPF.Converters
+{
+ using System;
+ using System.Globalization;
+ using System.Linq;
+ using System.Windows.Data;
+
+ using HandBrakeWPF.Model;
+ using HandBrakeWPF.Utilities;
+
+ public class OptionTabConverter : IValueConverter
+ {
+ public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
+ {
+ OptionsTab[] tabs = value as OptionsTab[];
+ if (tabs != null && UwpDetect.IsUWP())
+ {
+ return tabs.Where(s => s != OptionsTab.Updates).ToArray();
+ }
+
+ return value;
+ }
+
+ public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
+ {
+ throw new NotImplementedException();
+ }
+ }
+}