Ben Johnson
Ben Johnson

Reputation: 985

Why BorderColor="White" Not Working on Xamarin

I have two buttons. The first button have a border color and work fine and second button have border color too but not working.

The code for first Button is:

<Button Grid.Row="1" 
                Grid.Column="2"
                Text="GET" 
                BorderWidth="1"
                WidthRequest="60"
                HeightRequest="30"
                BorderColor="White"
                BackgroundColor="Black"
                TextColor="White"
                Opacity="0.7"
                Clicked="OnGetWeatherButtonClicked" />

This button have a border color.

The code from the second button who have property BorderColor="White" but not working:

<Button x:Name="Donate2Btn"
                Margin="10,0,10,10"
                Text="Donate for Developers !"
                FontSize="Large"
                Clicked="ShowInterstitial_OnClicked"
                BorderColor="White"
                BackgroundColor="Black"
                TextColor="White"
                Opacity="0.7"
                HeightRequest="35"
                VerticalOptions="Center"/>

The Button

Upvotes: 0

Views: 126

Answers (1)

Cfun
Cfun

Reputation: 9671

Because you are not setting BorderWidth property on the second Button, the default value is 0.

Upvotes: 2

Related Questions