I have an IValueConverter that returns true upon the provided ObservableCollection having a count of 3 or greater. This works great when the list is initialized to a specific count, but the moment it is modified to a point where the IValueConverter should switch from true to false or vice versa, it does not update.
IValueConverter
namespace LemonadeClient.UI.Converters
{
class HasValueConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
//cast it to a list
IList col = (IList)value;
//if it doesn't have anything return true
return col.Count >= 3;
}
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
throw new NotImplementedException();
}
}
}
XAML
<Label
HorizontalOptions="Center"
IsVisible="{Binding HistoryList, Converter={StaticResource HasValueConverter}}"
Text="Testing!" />
Is there a way to "force" IValueConverter to update? I'm not sure on how to approach this.