Professional Documents
Culture Documents
Carrusel (Automatico)
Carrusel (Automatico)
Carrusel (Automatico)
xaml----------------
<?xml version="1.0" encoding="utf-8" ?>
<CarouselPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="Carusel.MainPage">
<ContentPage>
<StackLayout VerticalOptions="Center">
<Label Text="Nombre" FontSize="Large"></Label>
<Image Source="https://tinyurl.com/8d495yn6"></Image>
</StackLayout>
</ContentPage>
<ContentPage>
<StackLayout VerticalOptions="Center">
<Label Text="Nombre" FontSize="Large"></Label>
<Image Source="https://tinyurl.com/wrye9yvw"></Image>
</StackLayout>
</ContentPage>
<ContentPage>
<StackLayout VerticalOptions="Center">
<Label Text="Nombre" FontSize="Large"></Label>
<Image Source="https://tinyurl.com/v9av3kyu"></Image>
</StackLayout>
</ContentPage>
</CarouselPage>
----------------------MainPage.xaml.cs-----------------
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Xamarin.Forms;
namespace Carusel
{
public partial class MainPage : CarouselPage
{
public MainPage()
{
InitializeComponent();
}
}
}
----------------------CarruselView.xaml-------------------------
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Xamarin.Forms;
using Xamarin.Forms.Xaml;
namespace Carusel
{
[XamlCompilation(XamlCompilationOptions.Compile)]
public partial class CaruselView : ContentPage
{
public CaruselView ()
{
InitializeComponent ();
List<Image> images = new List<Image>()
{
new Image() {Title = "Naruto", Url =
"https://tinyurl.com/3jkckys2"},
using System;
using System.Collections.Generic;
using System.Text;
namespace Carusel
{
class Image
{
public string Title { get; set; }
public string Url { get; set; }
}
}