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.
Syncfusion Feedback

Odd behavior

Thread ID:

Created:

Updated:

Platform:

Replies:

128548 Jan 27,2017 04:41 PM UTC Jan 31,2017 12:09 PM UTC Xamarin.Forms 3
loading
Tags: SfCarousel
KEVEN A SCHARASWAK
Asked On January 27, 2017 04:41 PM UTC

I have a Xamarin.Forms PCL project and have a xaml page (relevant code below)

if I add "viewmode = linear", the entire control doesnt show up. if the control shows up, the buttons do not, if the control doesnt show up, the buttons do. and the "default" viewmode seems to start from the bottom right of the screen and swipe up to the top left of the screen. i will attach a screenshot

<?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="SkazPro.BrewControl.Pages.RecipesPage"
             xmlns:carousel="clr-namespace:Syncfusion.SfCarousel.XForms;assembly=Syncfusion.SfCarousel.XForms">
  <ContentPage.Resources>
    <ResourceDictionary>
      <DataTemplate x:Key="ItemTemplate">
        <StackLayout Orientation="Vertical">
          <Label Text="{Binding Name}" TextColor="Black" FontSize="Large"  />
          <Label Text="{Binding FG}" TextColor="Black" FontSize="Small"  />
          <Label Text="{Binding OG}" TextColor="Black" FontSize="Small"  />
        </StackLayout>
      </DataTemplate>
    </ResourceDictionary>
  </ContentPage.Resources>
  <StackLayout>
    <carousel:SfCarousel x:Name="Carousel"  ItemTemplate="{StaticResource ItemTemplate}" DataSource="{Binding Recipes}" Offset="20" RotationAngle="30" SelectedIndex="1" HeightRequest="600" />
    <StackLayout Orientation="Horizontal">
      <Button Text="New Recipe" HorizontalOptions="Center" Clicked="OnNewClicked"/>
      <Button Text="Details" HorizontalOptions="Center" Clicked="OnDetailsClicked"/>
      <Button Text="Import" HorizontalOptions="Center" Clicked="OnImportClick"/>
    </StackLayout>
  </StackLayout>
</ContentPage>

the cs file:
  public partial class RecipesPage : ContentPage
    {
        public RecipesPage()
        {
            InitializeComponent();
            Carousel.BindingContext = new RecipesViewModel();
        }

        private void OnDetailsClicked(object sender, EventArgs e)
        {
            throw new NotImplementedException();
        }

        private void OnNewClicked(object sender, EventArgs e)
        {
            throw new NotImplementedException();
        }

        private void OnImportClick(object sender, EventArgs e)
        {
            throw new NotImplementedException();
        }
    }

recipeviewmodel.cs
 public class RecipesViewModel : ViewModelBase
    {
        public RecipesViewModel()
        {
#if DEBUG
            Recipes.Add(new Recipe
            {
                Name = "Test 1",
                FG = 1.120,
                OG = 0.120
            });
            Recipes.Add(new Recipe
            {
                Name = "Test 2",
                FG = 1.00,
                OG = 0.20
            });
            Recipes.Add(new Recipe
            {
                Name = "Test 3",
                FG = 0.95,
                OG = 0.09
            });
#endif
        }

        private ObservableCollection<Recipe> _recipes;

        public ObservableCollection<Recipe> Recipes
        {
            get
            {
                if (_recipes == null) Recipes = new ObservableCollection<Recipe>();
                return _recipes;
            }
            set
            {
                if (_recipes == value) return;
                OnPropertyChanging(() => Recipes);
                _recipes = value;
                OnCollectionChanged(() => Recipes);
            }
        }

        public Recipe SelectedRecipe
        {
            get
            {
                if (_selectedRecipe == null) SelectedRecipe = new Recipe();
                return _selectedRecipe;
            }
            set
            {
                if (_selectedRecipe == value) return;
                OnPropertyChanging(() => SelectedRecipe);
                _selectedRecipe = value;
                OnPropertyChanged(() => SelectedRecipe);
            }
        }

        private Recipe _selectedRecipe;

    }
}


Attachment: screenshot_7ec69f6b.zip

Rathana Kumar Sekar [Syncfusion]
Replied On January 30, 2017 12:46 PM UTC

Hi Keven,

Thank you for contacting Syncfusion Support.

We have checked the reported issue in our side. But we were unable to reproduce the reported issue. Please find the sample in which we have checked the reported issue in below

Sample: http://www.syncfusion.com/downloads/support/forum/128548/ze/SfCarouselSample357517424 

So could you please provide more information like issue reproducing sample or else modify above sample to reproduced reported issue.This will help us to provide appropriate solution on this.

Regards,
Rathanakumar S
 


KEVEN A SCHARASWAK
Replied On January 30, 2017 03:28 PM UTC

Here is your project, modified by me. 
Attachment: SfCarouselSample357517424__ad57d0bf.zip

Rathana Kumar Sekar [Syncfusion]
Replied On January 31, 2017 12:09 PM UTC

Hi Keven,

Thank you for contacting Syncfusion Support.

On further analysis with the provided sample we found that the height and width of the item has been not set.We have modified the sample with itemHeight and itemwidth for SfCarousel. Please find the modified sample below.


 
Regards,
Rathanakumar S


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.

Warning Icon 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.Close Icon

;