BoldSignEasily embed eSignatures in your .NET applications. Free sandbox with native SDK available.
I figured it out - it was right in front of me. I just needed to declare my sfListView as public static sfListView listView.
<listView:SfListView.ItemTemplate>
<DataTemplate>
<ViewCell>
<ViewCell.View>
<Grid x:Name="grid" RowSpacing="1"
BackgroundColor="{Binding IsSelected,
Converter={StaticResource customconverter}}">
<Entry TextChanged="Entry_TextChanged" VerticalOptions="Center"
HorizontalOptions="Center" HeightRequest="50"/>
</Grid>
</ViewCell.View>
</ViewCell>
</DataTemplate>
</listView:SfListView.ItemTemplate> |
private void Entry_TextChanged(object sender, TextChangedEventArgs e)
{
var entry = sender as Entry;
var contact = entry.BindingContext as Contacts;
if (e.NewTextValue != "")
contact.IsSelected = true;
else
contact.IsSelected = false;
}
…
public class CustomConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
if ((bool)value)
return Color.FromHex("#d3d3d3");
return Color.White;
}
} |