Zum ersten Mal mit Cross-Plattform-Apps mit Xamarin arbeite ich mit Xamarin Formen in Visual Studio 2017 Community.Button mit Bild und Text und Text unter dem Bild, wie?
Ich habe eine Schaltfläche mit einem Bild und Text, aber der Text muss unter dem Bild sein. Derzeit wird der Text links neben dem Bild angezeigt. Wie kann ich das tun?
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Xamarin.Forms;
namespace AppUnap
{
public class PPrincipal : ContentPage
{
public PPrincipal()
{
Button btn1= new Button();
btn1.Image = "notas.png";
btn1.Text = "Calificaciones";
btn1.HorizontalOptions = LayoutOptions.CenterAndExpand;
Button btn2 = new Button();
btn2.Image = "notas.png";
btn2.Text = "Aula Virtual";
btn2.HorizontalOptions = LayoutOptions.CenterAndExpand;
Content = new StackLayout
{
Spacing = 0,
VerticalOptions = LayoutOptions.CenterAndExpand,
Children =
{
new StackLayout
{
Spacing = 0,
Orientation = StackOrientation.Horizontal,
Children =
{
btn1,
btn2,
}
}
}
};
}
}
}