小编Med*_*tin的帖子

带图像,文字和文字的按钮吼叫图像,怎么样?

第一次使用xamarin的跨平台应用程序,我正在使用Visual Studio 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 =
                { …
Run Code Online (Sandbox Code Playgroud)

android text cross-platform button xamarin.forms

1
推荐指数
1
解决办法
1303
查看次数

标签 统计

android ×1

button ×1

cross-platform ×1

text ×1

xamarin.forms ×1