admin管理员组

文章数量:1302328

Tried to add Shell Flyout Items in AppShell.xaml.cs through below code.

 // Settings Page
 var settingsItem = new FlyoutItem
 {
     Title = "Settings", 
     Icon = new FontImageSource
     {
         Glyph = "\ue8b8",
         FontFamily = "MaterialIcons",
         Size = 694,
         Color = Color.FromArgb("#5f6368")
     },
     FlyoutDisplayOptions = FlyoutDisplayOptions.AsSingleItem,
     Items =
     {
         new ShellContent
         {
             ContentTemplate = new DataTemplate(typeof(Settings)),
             Title = "Settings"
         } 
     }
 };


            var aboutItem = new MenuItem
            {
                Text = "About",
                IconImageSource = new FontImageSource
                {
                    Glyph = "\uE88E",
                    FontFamily = "MaterialIcons",
                    Size = 694,
                    Color = Color.FromArgb("#5f6368")
                }
            };

            // Handle Click Event
            aboutItem.Clicked += (sender, e) =>
            {
                MainThread.BeginInvokeOnMainThread(async () =>
                 {
                     // Perform logout logic, such as navigating to the login page
                     await Shell.Current.GoToAsync("About");
                 });
            };

When any user click on Flyout item,navigation working properly in Debug Mode, but in Release mode Navigation not working. How to fix this?

本文标签: