0
第一次與xamarin交叉平臺的應用程序,我正在使用視覺工作室2017社區xamarin形式。按鈕與圖像和文字和文字以下圖像,如何?
我有一個圖片和文字按鈕,但文字需要在圖片下方。當前文本顯示在圖像的左側,我該怎麼做?
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,
}
}
}
};
}
}
}