Xamarin.forms:如何为标签栏添加渐变色 [英] Xamarin.forms : how to add a gradient color for tabbar

查看:347
本文介绍了Xamarin.forms:如何为标签栏添加渐变色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在xamrin froms应用程序中,我们有一个标签栏,我们需要在iOS和android设备中为该标签栏添加一些渐变颜色.我们怎么能呢?

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. 由设计人员制作具有渐变颜色的图像;
  2. 将其应用于选项卡,如:

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

UITabBar.Appearance.BackgroundImage = image;

正式文件: https://developer.xamarin.com/api/type/UIKit.UITabBar + UITabBarAppearance/

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

这篇关于Xamarin.forms:如何为标签栏添加渐变色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆