Xamarin Shell

Radoslav Atanasov 1 Reputation point
2021-01-16T21:45:46.087+00:00

57209-capture.png

Hello, I am using Xamarin Shell navigation, and I change all possible resources to set my app colors, but the fly menu is still White and accept my color only if there is an item as you can see. How can I change this white color?

Developer technologies | .NET | Xamarin
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. JarvanZhang 23,971 Reputation points
    2021-01-18T03:01:14.827+00:00

    Hello,​

    Welcome to our Microsoft Q&A platform!

    @Radoslav Atanasov Shell includes the FlyoutItemLayoutStyle class, which could be automatically applied to the FlyoutItem object.

    Check the code:

       <Shell ...>  
           <Shell.Resources>  
               ...  
               <ResourceDictionary>  
                   <Style Class="FlyoutItemLabelStyle" TargetType="Label">  
                       <Setter Property="TextColor" Value="DarkCyan"></Setter>  
                   </Style>  
               </ResourceDictionary>  
           </Shell.Resources>  
         
         
           <FlyoutItem Title="page_1">  
               <ShellContent Title="page_1" ContentTemplate="{DataTemplate local:Page1}" />  
           </FlyoutItem>  
           <FlyoutItem Title="page_2">  
               <ShellContent Title="page_2" ContentTemplate="{DataTemplate local:MainPage}" />  
           </FlyoutItem>  
       </Shell>  
    

    Tutorial: https://learn.microsoft.com/en-us/xamarin/xamarin-forms/app-fundamentals/shell/flyout#flyoutitem-and-menuitem-style-classes

    Best Regards,

    Jarvan Zhang


    If the response is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.