Xamarin.Plugins
Xamarin.Plugins copied to clipboard
Setting BackgroundColor for IconButton not working
Setting the BackgroundColor or the BorderColor for an IconButton does not work for me.
public App()
{
var tabbedPage = new TabbedPage();
tabbedPage.Children.Add(new ContentPage {
Title = "Controls",
Content = new StackLayout {
Children = {
new IconButton() {
Text = Iconize.Modules.First().Keys.First(),
BackgroundColor = Color.Red, // not working?
BorderColor = Color.Green, // not working?
}
}
}
});
MainPage = tabbedPage;
}
}
Same issue, only with Android and the icon is aligned to the left instead of being centered.
BackgroundColor, BorderColor and Text alignment work well with UWP.
+1, no BackgroundColor support on android.
Just to add that BorderWidth="0" also does not work. I.e. a border is still shown