Xamarin.Forms: Remove padding inside Button

前端 未结 4 775
无人及你
无人及你 2021-02-13 07:12

I want to have a small button. The height of the button is 30. On some plattforms (Android, UWP) the text inside the button is cut off. That\'s because there is a padding betwee

4条回答
  •  别跟我提以往
    2021-02-13 07:32

    Now Xamarin allows you to do something like this, in XAML:

     
         0
     
    

    Or in C#:

    Button button = new Button();
    button.Text = "Button";
    button.Clicked += OnClicked;
    button.Padding = new Thickness(0, 0, 0, 0);
    

提交回复
热议问题