Quantcast
Channel: Recent Threads — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 204402

Buttons doesnt fit to screen xamarin

$
0
0

hey i have to add +20 buttons in my app

i use this code

 var layout = new StackLayout() {
                Orientation = StackOrientation.Horizontal,
                HorizontalOptions = LayoutOptions.Start,
                VerticalOptions = LayoutOptions.Start,
            };
for (int i = 1; i < 20; i++)
            {
                var button = new Button
                {
                    Text =  i.ToString(),
                    HeightRequest = 45,
                    WidthRequest = 45,
                    Margin = 5,
                    BorderRadius = 100,
                    VerticalOptions = LayoutOptions.Center,


                };
                layout.Children.Add(button);

            }
            Content = layout;



        }

so now buttons are going away from screen

i have to do something like that


Viewing all articles
Browse latest Browse all 204402

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>