Share via


StateToBooleanConverter Class

Definition

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 class StateToBooleanConverter : Xamarin.Forms.IValueConverter
Inheritance
System.Object
StateToBooleanConverter
Implements

Constructors

StateToBooleanConverter()

Properties

StateToCompare

The LayoutState to compare to.

Methods

Convert(Object, Type, Object, CultureInfo)

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.

ConvertBack(Object, Type, Object, CultureInfo)

This method is not implemented and will throw a System.NotImplementedException.

Applies to