Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 77050

[Bug?] ListView Separator Style on iOS

$
0
0

I have a simple ListView and I want its separators to span the whole length but the code I found that should enable it doesn't get recognized by IntelliSense and I get an error. The code is the following snippet taken from the Microsoft docs site:

<ContentPage ...
         xmlns:ios="clr-namespace:Xamarin.Forms.PlatformConfiguration.iOSSpecific;assembly=Xamarin.Forms.Core">
<StackLayout Margin="20">
    <ListView ... ios:ListView.SeparatorStyle="FullWidth">
        ...
    </ListView>
</StackLayout>

Unfortunately though it's not working for me and I get a squiggly line saying that "The attachable property 'SeparatorStyle' was not found in the type 'ListView'. Is there something wrong in my code? It is as follows:

<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
         xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
         x:Class="Eorzea_Gatherer.Pages.NodesPage"
         xmlns:ios="clr-namespace:Xamarin.Forms.PlatformConfiguration.iOSSpecific;assembly=Xamarin.Forms.Core" 
         ios:Page.UseSafeArea="true"
         BackgroundColor="#F4F4F4">
<!--https://xamarinhelp.com/safeareainsets-xamarin-forms-ios/-->
<ListView x:Name="nodesListView"
          HasUnevenRows="True"
          BackgroundColor="#F4F4F4"
          Margin="30, 30, 30, 0">
    <ListView.ItemTemplate>
        <DataTemplate>
            <ViewCell>
                <Grid Padding="0, 5">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="60"/>
                        <ColumnDefinition/>
                    </Grid.ColumnDefinitions>
                    <Image Source="{Binding icon}"
                           HeightRequest="50"
                           WidthRequest="50"
                           Grid.Column="0"/>
                    <StackLayout Grid.Column="1">
                        <Label Text="{Binding item}"
                               TextColor="#171717"
                               FontSize="13"
                               FontFamily="SegoeUI"/>
                        <!--https://forums.xamarin.com/discussion/97996/binding-more-than-one-property-in-listview-->
                        <Label TextColor="#171717"
                               FontSize="12"
                               FontFamily="SegoeUI">
                            <Label.FormattedText>
                                <FormattedString>
                                    <Span Text="{Binding zone}"/>
                                    <Span Text=" - "/>
                                    <Span Text="{Binding slot}"/>
                                </FormattedString>
                            </Label.FormattedText>
                        </Label>
                        <Label TextColor="#171717"
                               FontSize="12"
                               FontFamily="SegoeUI">
                            <Label.FormattedText>
                                <FormattedString>
                                    <Span Text="{Binding time}"/>
                                    <Span Text=" - "/>
                                    <Span Text="00:00 AM"/>
                                </FormattedString>
                            </Label.FormattedText>
                        </Label>
                    </StackLayout>
                </Grid>
            </ViewCell>
        </DataTemplate>
    </ListView.ItemTemplate>
</ListView>


Viewing all articles
Browse latest Browse all 77050

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>