我无法使用我的工具栏。我使用 xaml 来定义工具栏项,如下所示:
<ContentPage.ToolbarItems>
<ToolbarItem Name="Refresh" Priority="0" Text="refresh" Order="Primary" Icon="refresh.png"/>
</ContentPage.ToolbarItems>
MainPage.xaml.cs 如下所示:
public MainPage()
{
InitializeComponent();
}
在 App.xaml.cs 中:
public App ()
{
MainPage = new NavigationPage(new MainPage());
}
为什么工具栏不显示?