Please look at my Flyout ShellContents image:
Just wondering, how can I change the text color of shellcontents in Flyout, as I can not find any appropriate foreground/text-color property under ShellContent to change the text color of the title. I have to apply the color from C#. I am making shellcontent pages as mentioned below:
ShellContent _ShellContent = new ShellContent
{
Title = "Home",
ContentTemplate = new DataTemplate(typeof(HomePage)),
//Route= "HomePage",
Icon = new FontImageSource
{
Glyph = Application.Current.Resources["Font-Home"].ToString(),
FontFamily = "MaterialFontFamily",
Color = _ShellIconColor
},
};
ShellPages.Items.Add(_ShellContent);
My AppShell.xaml:
<?xml version="1.0" encoding="UTF-8" ?>
<Shell
x:Class="myProject.AppShell"
xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:local="clr-namespace:myProject"
xmlns:test="clr-namespace:myProject.Views"
Shell.FlyoutBehavior="Flyout" x:Name="ShellPages">
</Shell>

According to Style FlyoutItem and MenuItem objects, you can use
FlyoutItemLabelStyleto change the text color of shellcontents in Flyout.Please add below style to your
Styles.xamlunder Resources\Styles folder in your project.Output: