0

我在这里遇到了一个奇怪的情况。我里面有一个 TabbedPage 和 4 个 NavigationPages。我添加了一个工具栏,其中只有一个图标。当我在本地机器上部署我的项目时,一切看起来都很好(打印屏幕)。但是当我在我的WP10设备上部署项目时,会发生这种情况:screenshot。绝对没有理由,我的工具栏位于屏幕底部。我看到了这个答案,并尝试实现它,但它引发了一个错误(注意:我将整个解决方案更新为 Xamarin.Forms 2.3.3.168)。

我的MainPage.xaml代码如下:

<?xml version="1.0" encoding="utf-8" ?>
<local:CustomTabbedPage xmlns="http://xamarin.com/schemas/2014/forms"
            xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
            xmlns:local="clr-namespace:_TIF_Xamarin;assembly=_TIF_Xamarin"
            x:Class="_TIF_Xamarin.MainPage">

     <local:CustomTabbedPage.ToolbarItems>
       <ToolbarItem Name="tool">
         <ToolbarItem.Icon>
           <OnPlatform x:TypeArguments="FileImageSource"
                       Android="dethbarlogo.png"
                       WinPhone="logosearch.png" />
           </ToolbarItem.Icon>
         </ToolbarItem>
       </local:CustomTabbedPage.ToolbarItems>

  <!--4 different tabs, which also are Navigation Pages-->
  <NavigationPage Title="Home">
    <x:Arguments>
      <local:HomePage />
    </x:Arguments>
  </NavigationPage>

  <NavigationPage Title="Exhibitor">
    <x:Arguments>
      <local:ExhibitorsPage />
    </x:Arguments>
  </NavigationPage>

  <NavigationPage Title="Exhibits">
    <x:Arguments>
      <local:ExhibitsPage />
    </x:Arguments>
  </NavigationPage>

  <NavigationPage Title="More">
    <x:Arguments>
      <local:MorePage />
    </x:Arguments>
  </NavigationPage>

</TabbedPage> 

任何帮助,将不胜感激。提前致谢。

4

0 回答 0