<ffimageloading:CachedImage
HorizontalOptions="EndAndExpand"
VerticalOptions="Center"
Aspect="AspectFill"
Source="{Binding Active,
Converter={local:BoolToSwitchConverter}}">
<ffimageloading:CachedImage.GestureRecognizers>
<TapGestureRecognizer
Command="{Binding
EditItemTappedCommand}"
NumberOfTapsRequired="1" />
</ffimageloading:CachedImage.GestureRecognizers>
</ffimageloading:CachedImage>
|
<listView:SfListView x:Name="listView" ItemsSource="{Binding contactsinfo}" ItemSpacing="0,0,5,0">
<listView:SfListView.ItemTemplate>
<DataTemplate>
<ViewCell>
<ViewCell.View>
<ffimageloading:CachedImage HorizontalOptions="EndAndExpand"
VerticalOptions="Center"
Aspect="AspectFill"
Source="{Binding Active, Converter={local:BoolToSwitchConverter}}">
<ffimageloading:CachedImage.GestureRecognizers>
<TapGestureRecognizer
Command="{Binding BindingContext.EditItemTappedCommand, Source={x:Reference listView}}"
NumberOfTapsRequired="1" />
</ffimageloading:CachedImage.GestureRecognizers>
</ffimageloading:CachedImage>
</ViewCell.View> </ViewCell>
</DataTemplate>
</listView:SfListView.ItemTemplate>
</listView:SfListView> |
|
<?xml version="1.0" encoding="utf-8" ?>
<ViewCell xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:local="clr-namespace:DataTemplateSelector"
x:Class="DataTemplateSelector.IncomingViewCell">
<Grid x:Name="ViewCellGrid" ColumnSpacing="2" Padding="0">
<Grid.Resources>
<ResourceDictionary>
<local:MainPageViewModel x:Key="viewModel"/>
</ResourceDictionary>
</Grid.Resources>
<Grid.GestureRecognizers>
<TapGestureRecognizer Command="{Binding Tapped,Source={StaticResource viewModel}}"/>
</Grid.GestureRecognizers>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"></ColumnDefinition>
<ColumnDefinition Width="40"></ColumnDefinition>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="*"></RowDefinition>
<RowDefinition Height="Auto"></RowDefinition>
</Grid.RowDefinitions>
<Frame OutlineColor="Transparent" HasShadow="False" x:Name="frame">
<Label TextColor="White" Text="{Binding Text}" LineBreakMode="WordWrap" />
</Frame>
<StackLayout Grid.Row="1" BackgroundColor="Gray" HeightRequest="1"/>
</Grid>
</ViewCell> |