Button の背景色を変更するには BackgroundColorプロパティを使用します。

以下にコードビハインドでButtonの背景色を変更する例を示します。

xaml側では、Buttonコントロールに「button1」「button2」という名前がついているものとします。

button1は背景色を赤に、button2は背景色を青に設定しています。

Color.Redのように指定することも、Color.FromHexメソッドを使用して16進数で指定することもできます。

MainPage.xaml.cs
  namespace buttonSample06
{
    public partial class MainPage : ContentPage
    {
        public MainPage()
        {
            InitializeComponent();

            button1.BackgroundColor = Color.Red;

            button2.BackgroundColor = Color.FromHex("00000FF");
        }
    }
}

次にXamlでButtonの背景色を変更する例を示します。

MainPage.xaml
  <Button Text="  赤  " BackgroundColor="Red" />
<Button Text="  青  " BackgroundColor="#0000FF" />          


実行例を以下に示します。