Xamarin.CommunityToolkit by Microsoft

<PackageReference Include="Xamarin.CommunityToolkit" Version="2.0.0" />

.NET API 749,960 bytes

 StateToBooleanConverter

public class StateToBooleanConverter : IValueConverter
This converter can be used with StateLayout to determine if a certain state is visible. This can be useful, for instance, in scenarios where you want to show/hide certain elements based on the current StateLayout.CurrentState. Additionally a StateLayout can be supplied in the parameter of the Convert method to compare against that.
public LayoutState StateToCompare { get; set; }

The LayoutState to compare to.

public object Convert(object value, Type targetType, object parameter, CultureInfo culture)

Takes the incoming StateLayout in value and compares it to StateToCompare. If they are equal it returns True, if they are not equal it returns False. Additionally a state to compare against can be provided in parameter.

public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)

This method is not implemented and will throw a NotImplementedException.