如何在 Xamarin.forms 中更改 Alertbox 的大小

how to alter the size of Alertbox in Xamarin.forms

我想在我的内容页面中使用 AlertBox。我正在以这种方式使用 AlertBox

var alertButton1 = new Button { Text = "SimpleWay" };
alertButton1.Clicked += async (sender, e) => 
{
     await DisplayAlert ("Alert", "You are veiwing data", "OK");
};

当我 运行 这样做时,它 运行 成功并以默认大小显示数据。但我想改变(垂直增加)它的大小。请帮忙。

您不能手动更改 AlertBox 的大小。当数据插入 AlertBox.

时,AlertBox 会自动设置其大小
     await DisplayAlert ("Alert", "You are veiwing data", "OK");    

从这个改变成这样...

     await DisplayAlert ("Alert", <add-a-complete-view>, "OK");

您的警告框会自动调整到所需的内容放置大小。