Hi all,
I have the following xaml
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:controls="clr-namespace:XLabs.Forms.Controls;assembly=XLabs.Forms"
xmlns:rating="clr-namespace:Syncfusion.SfRating.XForms;assembly=Syncfusion.SfRating.XForms"
x:Class="WSTest2.ValorarServicio">
<ScrollView>
<StackLayout Spacing="5" Padding="10" VerticalOptions="FillAndExpand">
<Grid x:Name="gridEncuesta" VerticalOptions="StartAndExpand" HorizontalOptions="StartAndExpand" ColumnSpacing="5" RowSpacing="15" >
<Grid.ColumnDefinitions>
<ColumnDefinition Width="3*" />
<ColumnDefinition Width="2*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="100" />
</Grid.RowDefinitions>
<Label Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" x:Name="lblDescripcionEncuesta" Font="Bold,15" VerticalOptions="CenterAndExpand" />
</Grid>
</StackLayout>
</ScrollView>
</ContentPage>
And in my code behind I Dynamically charge sfratings follows
protected override async void OnAppearing()
{
UserDialogs.Instance.ShowLoading("Recuperando la encuesta de la Solicitud [" + this.aviso.NUMERO + "].", MaskType.Black);
string Encuesta_List = await GetEncuestaRealizada(this.aviso.ID_ENCUESTA_REALIZADA);
lblDescripcionEncuesta.Text = encuestacabecera.TEXTO;
int ActualRow = 0;
foreach (Encuesta_Realizada_Detalle encuestarealizadadetalle in encuestarealizadadetallelist)
{
ActualRow++;
gridEncuesta.RowDefinitions.Add(new RowDefinition { Height = GridLength.Auto });
gridEncuesta.Children.Add(new Label
{
Text = "XXX-" + ActualRow,
HorizontalOptions = LayoutOptions.StartAndExpand,
VerticalOptions = LayoutOptions.Center,
FontAttributes = FontAttributes.Bold
}, 0, ActualRow);
gridEncuesta.Children.Add(new SfRating
{
Value = encuestarealizadadetalle.VALOR,
ItemCount = 5,
ItemSpacing = 7,
ItemSize = 25,
ReadOnly = true,
HorizontalOptions = LayoutOptions.EndAndExpand,
VerticalOptions = LayoutOptions.CenterAndExpand,
}, 1, ActualRow);
}
UserDialogs.Instance.HideLoading();
}
The only result I load a row, when the list I have 4 elements.
If I run the same process without loading the sfrating control works properly.
Someone could help me.
Thank you.
Sorry for my English is very bad.