【发布时间】:2021-04-14 23:44:06
【问题描述】:
我是 Xamarin.Forms 和 XAML 的新手。我正在尝试为我的 TabbedPage 中的不同页面仅显示 IOS 的选项卡图标。我做了一些搜索,发现 UIKit 在 UITabBarSystem 上引用了 IOS 上可用的系统图标。我怎样才能利用该枚举中的元素而不必从互联网上获取这些图标? TabbedPage 是具有子页面的根,这些子页面是 ContentPages 和 ListView 页面。因此,正如您从所附示例中看到的那样,我希望 FavouritesPage 的“IconImageSource”属性能够从 iOS UIKit 获取图像。这可能吗?
<?xml version="1.0" encoding="utf-8" ?>
<TabbedPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:views="clr-namespace:PhoneApp.Views"
x:Class="PhoneApp.Views.MainPage">
<TabbedPage.Title>
</TabbedPage.Title>
<TabbedPage.Children>
<views:FavouritesPage Title="Favourites" IconImageSource=""/>
<views:RecentsPage Title="Recents"/>
<views:ContactsPage Title="Contacts"/>
<views:KeypadPage Title="Keypad"/>
<views:VoicemailPage Title="Voicemail"/>
</TabbedPage.Children>
</TabbedPage>
【问题讨论】:
标签: xaml xamarin.forms xamarin.ios uikit tabbedpage