Kanak Shukla
Kanak Shukla

Reputation: 229

how to alter the size of Alertbox in Xamarin.forms

I want to use AlertBox in my content page. I am using AlertBox in this way.

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

When I run this, It runs successfully and displays data in it's default size. But I want to alter(increase vertically) the size of it. Please help.

Upvotes: 2

Views: 472

Answers (1)

CoderNeji
CoderNeji

Reputation: 2074

You cannot alter the the size of your AlertBox manually. The AlertBox automatically sets its size as the data is inserted into the AlertBox.

     await DisplayAlert ("Alert", "You are veiwing data", "OK");    

From this change to something like this...

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

Your alert box will automatically adjust itself to the desired and content placing size.

Upvotes: 2

Related Questions