title: toolbar items appear twice in a page in some ios devices xamarin.forms
body: <p>i have created a cross platform app using xamarin.forms. i added some toolbar items to some pages but the problem is that they appear twice as in the following picture. <a href="https://i.stack.imgur.com/WMTGM.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/WMTGM.png" alt="enter image description here" /></a></p>
  <p>this is the code of ny page:</p>
  <pre><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot; ?&gt;
  &lt;ContentPage xmlns=&quot;http://xamarin.com/schemas/2014/forms&quot;
               xmlns:x=&quot;http://schemas.microsoft.com/winfx/2009/xaml&quot;
               x:Class=&quot;ALNahrainAlphaApp.Accounting&quot;
               xmlns:images=&quot;clr-namespace:ALNahrainAlphaApp;assembly=ALNahrainAlphaApp&quot;
                xmlns:ios=&quot;clr-namespace:Xamarin.Forms.PlatformConfiguration.iOSSpecific;assembly=Xamarin.Forms.Core&quot;
                ios:Page.UseSafeArea=&quot;true&quot;&gt;
      &lt;ContentPage.ToolbarItems &gt;
  
          &lt;ToolbarItem Order=&quot;Secondary&quot;
                       Text=&quot;logout&quot;
                       Priority=&quot;2&quot;
                  Clicked=&quot;ToolbarItem_Clicked&quot;
                      /&gt;
  
          &lt;ToolbarItem Order=&quot;Secondary&quot;
                       Text=&quot;View Total Income&quot;
                       Priority=&quot;2&quot;
                  Clicked=&quot;ToolbarItem_Clicked_1&quot;
                      /&gt;
      &lt;/ContentPage.ToolbarItems&gt;
      &lt;ContentPage.Resources&gt;
          &lt;Style TargetType=&quot;Grid&quot;&gt;
              &lt;Setter Property=&quot;VisualStateManager.VisualStateGroups&quot;&gt;
                  &lt;VisualStateGroupList&gt;
                      &lt;VisualStateGroup x:Name=&quot;CommonStates&quot;&gt;
                          &lt;VisualState x:Name=&quot;Normal&quot; /&gt;
                          &lt;VisualState x:Name=&quot;Selected&quot;&gt;
                              &lt;VisualState.Setters&gt;
                                  &lt;Setter Property=&quot;BackgroundColor&quot;
                                          Value=&quot;#f4f0ec&quot; /&gt;
                              &lt;/VisualState.Setters&gt;
                          &lt;/VisualState&gt;
                      &lt;/VisualStateGroup&gt;
                  &lt;/VisualStateGroupList&gt;
              &lt;/Setter&gt;
          &lt;/Style&gt;
      &lt;/ContentPage.Resources&gt;
      &lt;ContentPage.Content&gt;
  
          &lt;AbsoluteLayout Padding=&quot;0&quot; HorizontalOptions=&quot;FillAndExpand&quot; VerticalOptions=&quot;FillAndExpand&quot;&gt;
              &lt;StackLayout BackgroundColor=&quot;White&quot; AbsoluteLayout.LayoutBounds=&quot;0, 0, 1, 1&quot; AbsoluteLayout.LayoutFlags=&quot;All&quot;&gt;
                  
                  &lt;StackLayout HorizontalOptions=&quot;CenterAndExpand&quot; VerticalOptions=&quot;CenterAndExpand&quot; &gt;
                      &lt;SearchBar HorizontalOptions=&quot;FillAndExpand&quot; x:Name=&quot;search&quot;  TextChanged=&quot;search_TextChanged&quot;/&gt;
                      &lt;RefreshView x:Name=&quot;refresh&quot; &gt;
                          &lt;CollectionView x:Name=&quot;registeredstdslist&quot; SelectionChanged=&quot;registeredstdslist_SelectionChanged&quot; SelectionMode=&quot;Single&quot; &gt;
                              &lt;CollectionView.Header&gt;
                                  &lt;Grid Padding=&quot;2&quot; ColumnSpacing=&quot;1&quot; RowSpacing=&quot;1&quot;&gt;
                                      &lt;Grid.RowDefinitions&gt;
                                          &lt;RowDefinition Height=&quot;35&quot;/&gt;
  
                                      &lt;/Grid.RowDefinitions&gt;
                                      &lt;Grid.ColumnDefinitions&gt;
                                          &lt;ColumnDefinition Width=&quot;0.4*&quot;/&gt;
                                          &lt;ColumnDefinition Width=&quot;0.5*&quot;/&gt;
                                          &lt;ColumnDefinition Width=&quot;0.5*&quot;/&gt;
                                          &lt;ColumnDefinition Width=&quot;0.3*&quot;/&gt;
                                          &lt;ColumnDefinition Width=&quot;0.2*&quot;/&gt;
                                          &lt;ColumnDefinition Width=&quot;0.3*&quot;/&gt;
                                      &lt;/Grid.ColumnDefinitions&gt;
                                      &lt;Label 
                                  Grid.Column=&quot;0&quot;
                                  Text=&quot;StdID&quot;
                                   TextColor=&quot;Black&quot;
                                      VerticalOptions=&quot;Center&quot;
                                      HorizontalOptions=&quot;Center&quot;
                                      LineBreakMode=&quot;TailTruncation&quot;
                                 /&gt;
                                      &lt;Label 
                                  Grid.Column=&quot;1&quot; 
                                  Text=&quot;Name&quot;
                                   TextColor=&quot;Black&quot;
                                      VerticalOptions=&quot;Center&quot;
                                      HorizontalOptions=&quot;Center&quot;
                                      LineBreakMode=&quot;TailTruncation&quot;
                                  /&gt;
                                      &lt;Label 
                                  Grid.Column=&quot;2&quot;
                                  Text=&quot;Expected Date&quot;
                                   TextColor=&quot;Black&quot;
                                      VerticalOptions=&quot;Center&quot;
                                      HorizontalOptions=&quot;Center&quot;
                                      LineBreakMode=&quot;TailTruncation&quot;
                                  /&gt;
                                      &lt;Label
                                  Grid.Column=&quot;3&quot;
                                  Text=&quot;Edlevel&quot;
                                   TextColor=&quot;Black&quot;
                                      VerticalOptions=&quot;Center&quot;
                                      HorizontalOptions=&quot;Center&quot;
                                      LineBreakMode=&quot;TailTruncation&quot;
                                  /&gt;
                                      &lt;Label
                                  Grid.Column=&quot;4&quot;
                                  Text=&quot;Grade&quot;
                                   TextColor=&quot;Black&quot;
                                      VerticalOptions=&quot;Center&quot;
                                      HorizontalOptions=&quot;Center&quot;
                                      LineBreakMode=&quot;TailTruncation&quot;
                                  /&gt;
                                      &lt;Label
                                  Grid.Column=&quot;5&quot;
                                  Text=&quot;Status&quot;
                                   TextColor=&quot;Black&quot;
                                      VerticalOptions=&quot;Center&quot;
                                      HorizontalOptions=&quot;Center&quot;
                                      LineBreakMode=&quot;TailTruncation&quot;
                                  /&gt;
  
                                  &lt;/Grid&gt;
  
                              &lt;/CollectionView.Header&gt;
                              &lt;CollectionView.ItemTemplate&gt;
                                  &lt;DataTemplate &gt;
                                      &lt;Grid ColumnSpacing=&quot;1&quot; RowSpacing=&quot;0&quot; Padding=&quot;9,0,0,0&quot; &gt;
                                          &lt;Grid.RowDefinitions&gt;
                                              &lt;RowDefinition Height=&quot;40&quot;/&gt;
                                          &lt;/Grid.RowDefinitions&gt;
                                          &lt;Grid.ColumnDefinitions&gt;
                                              &lt;ColumnDefinition Width=&quot;0.4*&quot;/&gt;
                                              &lt;ColumnDefinition Width=&quot;0.5*&quot;/&gt;
                                              &lt;ColumnDefinition Width=&quot;0.5*&quot;/&gt;
                                              &lt;ColumnDefinition Width=&quot;0.3*&quot;/&gt;
                                              &lt;ColumnDefinition Width=&quot;0.2*&quot;/&gt;
                                              &lt;ColumnDefinition Width=&quot;0.3*&quot;/&gt;
  
                                          &lt;/Grid.ColumnDefinitions&gt;
                                          &lt;Label 
                                      Grid.Column=&quot;0&quot;
                                      Text=&quot;{Binding stdid}&quot;
                                      TextColor=&quot;Black&quot;
                                      VerticalOptions=&quot;Center&quot;
                                      HorizontalOptions=&quot;Center&quot;
                                      LineBreakMode=&quot;TailTruncation&quot;
                                          FontSize=&quot;13&quot;
                                      /&gt;
                                          &lt;Label 
                                      Grid.Column=&quot;1&quot;
                                      Text=&quot;{Binding name}&quot;
                                      TextColor=&quot;Black&quot;
                                      VerticalOptions=&quot;Center&quot;
                                      HorizontalOptions=&quot;Center&quot;
                                      LineBreakMode=&quot;TailTruncation&quot;
                                          FontSize=&quot;13&quot;
                                      /&gt;
                                          &lt;Label 
                                      Grid.Column=&quot;2&quot;
                                      Text=&quot;{Binding ExpectedDateofPayment}&quot;
                                      TextColor=&quot;Black&quot;
                                      VerticalOptions=&quot;Center&quot;
                                      HorizontalOptions=&quot;Center&quot;
                                      LineBreakMode=&quot;TailTruncation&quot;
                                          FontSize=&quot;13&quot;
                                         
                                      /&gt;
                                          &lt;Label 
                                      Grid.Column=&quot;3&quot;
                                      Text=&quot;{Binding edlevel}&quot;
                                      TextColor=&quot;Black&quot;
                                      VerticalOptions=&quot;Center&quot;
                                      HorizontalOptions=&quot;Center&quot;
                                      LineBreakMode=&quot;TailTruncation&quot;
                                          FontSize=&quot;13&quot;
                                      /&gt;
                                          &lt;Label 
                                      Grid.Column=&quot;4&quot;
                                      Text=&quot;{Binding grade}&quot;
                                      TextColor=&quot;Black&quot;
                                      VerticalOptions=&quot;Center&quot;
                                      HorizontalOptions=&quot;Center&quot;
                                      LineBreakMode=&quot;TailTruncation&quot;
                                          Padding=&quot;10&quot;
                                          FontSize=&quot;13&quot;
                                      /&gt;
                                          &lt;Image
                                      
                                      Grid.Column=&quot;5&quot;
                                      VerticalOptions=&quot;Center&quot;
                                      HorizontalOptions=&quot;Center&quot;
                                      HeightRequest=&quot;20&quot;
                                      WidthRequest=&quot;20&quot;
                                     &gt;
                                              &lt;Image.Triggers&gt;
                                                  &lt;DataTrigger TargetType=&quot;Image&quot; Binding=&quot;{Binding status}&quot; Value=&quot;false&quot; &gt;
                                                      &lt;Setter Property=&quot;Source&quot; Value=&quot;{OnPlatform Android=redtik.png,iOS=redtik.png}&quot;/&gt;
                                                  &lt;/DataTrigger&gt;
                                                  &lt;DataTrigger TargetType=&quot;Image&quot; Binding=&quot;{Binding status}&quot; Value=&quot;true&quot; &gt;
                                                      &lt;Setter Property=&quot;Source&quot; Value=&quot;{OnPlatform Android=greentik.png, iOS=greentik.png}&quot;/&gt;
  
                                                  &lt;/DataTrigger&gt;
                                              &lt;/Image.Triggers&gt;
                                          &lt;/Image&gt;
  
                                      &lt;/Grid&gt;
                                  &lt;/DataTemplate&gt;
                              &lt;/CollectionView.ItemTemplate&gt;
                          &lt;/CollectionView&gt;
                      &lt;/RefreshView&gt;
                      &lt;StackLayout VerticalOptions=&quot;EndAndExpand&quot;  HorizontalOptions=&quot;FillAndExpand&quot; Orientation=&quot;Horizontal&quot; BackgroundColor=&quot;#0d98ba&quot;&gt;
                          &lt;StackLayout Style=&quot;{StaticResource ButtonNavigationBarStackLayoutStyle}&quot; x:Name=&quot;stckAddStd&quot;&gt;
                              &lt;Image Margin=&quot;0,10,0,5&quot; x:Name=&quot;imgAdd&quot; Style=&quot;{StaticResource ButtonNavigationBarImageStyle}&quot; /&gt;
                              
                          &lt;/StackLayout&gt;
                          &lt;StackLayout Style=&quot;{StaticResource ButtonNavigationBarStackLayoutStyle}&quot; x:Name=&quot;stckfilter&quot;&gt;
                              &lt;Image Margin=&quot;0,10,0,10&quot; x:Name=&quot;imgfilter&quot; Style=&quot;{StaticResource ButtonNavigationBarImageStyle}&quot; /&gt;
                              
                          &lt;/StackLayout&gt;
                          &lt;StackLayout Style=&quot;{StaticResource ButtonNavigationBarStackLayoutStyle}&quot; x:Name=&quot;stckshare&quot;&gt;
                              &lt;Image Margin=&quot;0,10,0,10&quot; x:Name=&quot;imgshare&quot; Style=&quot;{StaticResource ButtonNavigationBarImageStyle}&quot; /&gt;
                              
                          &lt;/StackLayout&gt;
  
                      &lt;/StackLayout&gt;
                  &lt;/StackLayout&gt;
              &lt;/StackLayout&gt;
              &lt;ContentView x:Name=&quot;popupLoadingView&quot; BackgroundColor=&quot;Transparent&quot; Padding=&quot;10, 0&quot; IsVisible=&quot;false&quot;  AbsoluteLayout.LayoutBounds=&quot;0, 0, 1, 1&quot; AbsoluteLayout.LayoutFlags=&quot;All&quot;&gt;
                  &lt;StackLayout VerticalOptions=&quot;Center&quot; HorizontalOptions=&quot;Center&quot;&gt;
                      &lt;StackLayout Orientation=&quot;Vertical&quot; HeightRequest=&quot;150&quot; WidthRequest=&quot;200&quot; BackgroundColor=&quot;Transparent&quot;&gt;
  
                          &lt;ActivityIndicator x:Name=&quot;activityIndicator&quot; Margin=&quot;0,50,0,0&quot; VerticalOptions=&quot;Center&quot; HorizontalOptions=&quot;Center&quot; Color=&quot;Black&quot; WidthRequest=&quot;40&quot; HeightRequest=&quot;40&quot; &gt;&lt;/ActivityIndicator&gt;
                      &lt;/StackLayout&gt;
                  &lt;/StackLayout&gt;
              &lt;/ContentView&gt;
          &lt;/AbsoluteLayout&gt;
      &lt;/ContentPage.Content&gt;
     
  &lt;/ContentPage&gt;
  </code></pre>
  <p>in android nothing is wrong. but for some reason, in ios, the toolbar items are repeated. any suggestions. thanks in advance.</p>