rotorgames / Rg.Plugins.Popup

Xamarin Forms popup plugin
MIT License
1.15k stars 337 forks source link

the background of the button is not displayed #705

Closed Lavshyak closed 2 years ago

Lavshyak commented 2 years ago

.xaml:

<?xml version="1.0" encoding="UTF-8"?>
<pages:PopupPage xmlns="http://xamarin.com/schemas/2014/forms" 
             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
             x:Class="LSchedule.Pages.Additional.Popup_AddFavorite"
             xmlns:pages="clr-namespace:Rg.Plugins.Popup.Pages;assembly=Rg.Plugins.Popup"
             >
    <StackLayout
        Orientation="Vertical"
        Margin="60,200,60,107"
        BackgroundColor="White"
        x:Name='_root_StackLayout'
        >
    </StackLayout>
</pages:PopupPage>

piece of .cs:

_addToFavorites_Button = new Button()
            {
                Text="Добавить",
                WidthRequest = 200,
                HeightRequest = 50,
                BackgroundColor = new Color(48, 109, 229),
                BorderColor = new Color(48, 109, 229),
                BorderWidth = 1,
                TextColor = Color.BlanchedAlmond,
                TextTransform = TextTransform.Uppercase,
                IsEnabled = true
            };
            _root_StackLayout.Children.Add(_addToFavorites_Button);

as a result, the selected button text color is displayed, but the background and border are not. screenshot: https://ibb.co/jMfGWLZ

why can it be so?

Lavshyak commented 2 years ago

I made a mistake in the color code. everything works