Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 91519

Tab Bar Icon Sizing

$
0
0

Hi there, trying to change size of my tabbar icons without having to make a certain size for each device. I read somewhere that you can do an AspectFill to maintain aspect ratio but it didnt work for me. Go easy on me, somewhat new to this! Here is the code..
`public class MainNavigation : TabbedPage
{
public MainNavigation ()
{
FileImageSource seriesImage = new FileImageSource();
seriesImage.File = "series.png";
//seriesImage.WidthRequest = "AspectFill";

        Children.Add(new NavigationPage (new SeriesPage ()) {
            Title = "Series",
            BarBackgroundColor = Color.FromHex("#ededed"),
            BarTextColor = Color.FromHex("#e46769"),
            Icon = seriesImage,
        });
        Children.Add(new NavigationPage (new BlogPage ()) {

            Title = "Blog",
            BarBackgroundColor = Color.FromHex("#ededed"),
            BarTextColor = Color.FromHex("#e46769"),
            Icon = "blog.png",

        });
        Children.Add(new NavigationPage (new AboutPage ()) {

            Title = "About",
            BarBackgroundColor = Color.FromHex("#ededed"),
            BarTextColor = Color.FromHex("#e46769"),
            Icon = "cross.png",

        });



    }
}`

Viewing all articles
Browse latest Browse all 91519

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>