Olá, Marcelo
Fiz um projeto novo e consegui fazer um ScrollView Horizontal:
Segue o código XAML:
<Grid RowSpacing="0">
<Grid.RowDefinitions>
<RowDefinition Height="*"></RowDefinition>
<RowDefinition Height="Auto"></RowDefinition>
</Grid.RowDefinitions>
<ScrollView Grid.Row="0" HorizontalOptions="FillAndExpand" Orientation="Horizontal" VerticalOptions="StartAndExpand">
<StackLayout x:Name="StackGallery" Padding="1" Orientation="Horizontal" HorizontalOptions="FillAndExpand">
</StackLayout>
</ScrollView>
<Label Grid.Row="1" Text="Found x items" HeightRequest="30"></Label>
</Grid>
e também o code behind:
class Veiculo
{
public string ImageSrc { get; }
public string Nome { get; }
public decimal Preco { get; }
public Veiculo(string imageSrc, string nome, decimal preco)
{
this.ImageSrc = imageSrc;
this.Nome = nome;
this.Preco = preco;
}
}
public partial class MainPage : ContentPage
{
public MainPage()
{
InitializeComponent();
List<Veiculo> veiculos = new List<Veiculo>
{
new Veiculo("http://pngimg.com/uploads/volkswagen/volkswagen_PNG1805.png", "Fusca 1.8", 10000),
new Veiculo("https://lh3.googleusercontent.com/-rNDRy76a_3Y/AAAAAAAAAAI/AAAAAAAAAGE/zG-Irt10ugA/photo.jpg", "Corsa 1.6", 15000),
new Veiculo("http://pruebas.honda.mx/assets/img/megamenu/png/motos/detail/trabajo/CGL125TOOL.png", "CG 125 Honda", 10000),
new Veiculo("https://lh4.googleusercontent.com/-OjnurfyrTs8/AAAAAAAAAAI/AAAAAAAAAAc/HERNt6S2Jns/photo.jpg", "Kawasaki 700 cc", 20000),
new Veiculo("http://lh6.googleusercontent.com/-MoN-6ggcPuQ/AAAAAAAAAAI/AAAAAAAAHAY/Y5u-tchpBQQ/s512-c/photo.jpg", "Scania 2 eixos", 50000)
};
foreach (var item in veiculos)
{
var grid = new Grid
{
RowDefinitions =
{
new RowDefinition { Height = 102 },
new RowDefinition { Height = 32 },
new RowDefinition { Height = 32 },
},
ColumnDefinitions =
{
new ColumnDefinition { Width = 120 }
}
};
var img = new Image { Source = ImageSource.FromUri(new Uri(item.ImageSrc)) };
var lblNome = new Label { Text = item.Nome };
var lblPreco = new Label { Text = item.Preco.ToString() };
grid.Children.Add(img, 0, 0);
grid.Children.Add(lblNome, 0, 1);
grid.Children.Add(lblPreco, 0, 2);
StackGallery.Children.Add(grid);
}
}
}
Veja se atende a sua necessidade.
Boa sorte e bons estudos