I think I found the right solution for you. If you want to use native Api's on Xamarin controls, you can use custom renderer for them which are great! Here is the renderer for the TabedPage:
[assembly: ExportRenderer(typeof(MainPage), typeof(MyTabbedPageRenderer))]
namespace TestApp.iOS
{
public class MyTabbedPageRenderer : TabbedRenderer
{
public override void ViewWillAppear(bool animated)
{
base.ViewWillAppear(animated);
if (TabBar?.Items == null) return;
//Setting the Icons
TabBar.Items[0].Image = GetTabIcon(UITabBarSystemItem.Search);
TabBar.Items[1].Image = GetTabIcon(UITabBarSystemItem.Downloads);
TabBar.Items[2].Image = GetTabIcon(UITabBarSystemItem.Bookmarks);
}
private UIImage GetTabIcon(UITabBarSystemItem systemItem)
{
//Convert UITabBarItem to UIImage
UITabBarItem item = new UITabBarItem(systemItem, 0);
return UIImage.FromImage(item.SelectedImage.CGImage, item.SelectedImage.CurrentScale, item.SelectedImage.Orientation);
}
}
}
I created a sample for you, which you can find here. If you have any questions, please ask!
Regards
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…