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.

Fill SfRotator using a StackLayout inside a SfRotatorItem

Thread ID:

Created:

Updated:

Platform:

Replies:

128625 Feb 1,2017 12:37 PM Feb 7,2017 07:20 AM Xamarin.Forms 3
loading
Tags: SfRotator
mtwsm
Asked On February 1, 2017 12:37 PM

Good evening,

I recently implemented the control SfRotator and I had some issues. The first one is when we fill our rotator with some data using SfRotatorItem, it looks like we can't wrap anything into a StackLayout. The item is well loaded, but nothing is displayed even if the documentation said that ItemContent should accept a view. Here is my code :

[CODE]
if (e.PropertyName == nameof(context.News))
{
  var rotator = new SfRotator() { BackgroundColor = Color.Transparent, HeightRequest = 200};

  foreach (var item in context.News)
  {
    var stack = new StackLayout() { Children = { new Label() { Text = "Test"} } };
    var rotatorItem = new SfRotatorItem() { ItemContent = stack };
    rotator.DataSource.Add(rotatorItem);
  }

 RotatorLayout.Children.Add(rotator);
[/CODE]

I thank you in advance for your answer and I wish you a good evening !
Best regards,

Rathana Kumar Sekar [Syncfusion]
Replied On February 2, 2017 08:29 AM

Hi Toussaint 

Thanks for contacting Syncfusion Support. 

We are currently working on you reported feature.It will be available our upcoming volume release 1,2017 which will be available on first week of February.We can achieve your requirment using populate the item through ItemTemplate.We have prepared sample to show demo on "How to populate the items through ItemTemplate". Please find the sample from below. 

Regards,
Rathanakumar S
 


mtwsm
Replied On February 6, 2017 11:41 AM

Hi Rathana Kumar,

Your solution is pointing now to another issue that I had and that pushed me to use SfRotatorItem. Indeed, your sample is working fine, but when I fill my rotator with some data coming from an async method, this seems to lead on an update issue. 

I could provide you some code, but it's very similar to what you gave me beside the async method. Could you check it out ?

Best regards, 
mtwsm

Rathana Kumar Sekar [Syncfusion]
Replied On February 7, 2017 07:20 AM

Hi Toussaint,

Thanks for your update.

We are currently facing some issue in ItemContent API of SfRotator. A support incident to track the status of the issue has been created under your account.  Please log on to our support website to check for further updates.


  
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.

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.

;