We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

SfListView Binding to ObservableCollection<T>

Thread ID:

Created:

Updated:

Platform:

Replies:

130862 Jun 7,2017 07:30 AM Jun 8,2017 06:10 AM Xamarin.Forms 1
loading
Tags: SfListView
Valeriano Simeone
Asked On June 7, 2017 07:30 AM

Hi,
I've some problem with binding SfListView to ObservableCollection<T>: when collection contains more then one element they are showed corretly into Xaml page, instead when the collection contains only one element this is not show.

XAML:
    <ContentPage.Content>
        <StackLayout>
            <!-- Frame cover with gallery and commands-->
            <Frame HasShadow="True" BackgroundColor="White" Padding="0" >
                <StackLayout VerticalOptions="Start" Padding="0"  Spacing="0">

                    <!-- Cover -->
                    <Grid BackgroundColor="White" HeightRequest="120">
                        <Image Source="cover.png" Opacity="0.5" Aspect="AspectFill" />

                        <sflistview:SfListView Orientation="Horizontal" ItemSpacing="0" ItemSize="120"
                                                        ItemsSource="{Binding Pictures}" >
                            <sflistview:SfListView.Behaviors>
                                <behaviors:EventToCommandBehavior
                                                    EventName="ItemTapped"
                                                    Command="{Binding ViewAlbumCommand}" />
                            </sflistview:SfListView.Behaviors>
                            <sflistview:SfListView.ItemTemplate>
                                <DataTemplate>
                                    <ffimage:CachedImage Aspect="AspectFill" Source="{Binding ThumbUri}" />
                                </DataTemplate>
                            </sflistview:SfListView.ItemTemplate>
                        </sflistview:SfListView>
                    </Grid>
                   
                    <!-- other grid -->
                </StackLayout>
            </Frame>

          <!-- other frame -->
        </StackLayout>
    </ContentPage.Content>

Why?
Thnks,
Valeriano Simeone


Muthu Kumaran Gnanavinayagam [Syncfusion]
Replied On June 8, 2017 06:10 AM

Hi Valeriano, 
 
Sorry for the inconvenience. 
 
We are able to reproduce the reported issue “SfListView in Horizontal orientation does not layout when Binding only one item from ObservableCollection” at our end. As this is forum, we cannot provide patch. Therefore a new support incident has been created under your account for providing custom assemblies which includes the fix for the reported issue. Please log on to our support website to check for further updates.            
      
 
Regards, 
G.Muthu Kumaran. 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;