Xamarin.forms : how to add a gradient color for ta

2019-08-19 06:22发布

问题:

in xamrin froms app, we have a tabbar, we need to add some gradient color for that tab bar in both iOS and android devices. how can we that ?

回答1:

  1. Make a image with gradient color by your designer;
  2. The apply it to tabbar like:

    UITabBar.Appearance.BackgroundImage = image;

Official documents: https://developer.xamarin.com/api/type/UIKit.UITabBar+UITabBarAppearance/