--- /dev/null
+using LibTVRefCommonPortable.DataModels;
+using System;
+using System.Collections.Generic;
+using System.Globalization;
+using System.Text;
+using Xamarin.Forms;
+
+namespace TVApps.Controls
+{
+ class EnableStateConverter : IValueConverter
+ {
+ public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
+ {
+ return ((List<AppShortcutInfo>)value).Count > 0;
+ }
+
+ public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
+ {
+ throw new NotImplementedException();
+ }
+ }
+}
using System.Windows.Input;
using System;
using System.Collections.Generic;
+using TVApps.Controls;
namespace TVApps.Views
{
FontSize = SizeUtils.GetFontSize(28),
};
OptionButton.Clicked += OnOptionsClicked;
+ Binding binding = new Binding("InstalledAppList");
+ binding.Converter = new EnableStateConverter();
+ OptionButton.SetBinding(Button.IsEnabledProperty, binding);
this.Children.Add(OptionButton,
heightConstraint: Constraint.Constant(SizeUtils.GetHeightSize(80)),