Mantain fllyout menu in windows

Eduardo Gomez 3,671 Reputation points
2023-11-30T22:07:02.1133333+00:00

I want to maintain this open n Window

I am doing this

  public partial class AppShell : Shell {
      public AppShell(AppShellViewModel appShellViewModel) {
          InitializeComponent();

          Navigating += AppShell_Navigating;


private void AppShell_Navigating(object? sender, ShellNavigatingEventArgs e) {

    if (DeviceInfo.Current.Idiom == DeviceIdiom.Desktop) {

        FlyoutIsPresented = true;
    }

right now when I navigate to a new page, the flyout closes

The flyout is sopose to apear when I logged in, and in windows I wnt it to be open all the time

app https://github.com/eduardoagr/DemyAI

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

Accepted answer
  1. Yonglun Liu (Shanghai Wicresoft Co,.Ltd.) 50,126 Reputation points Microsoft External Staff
    2023-12-01T02:42:32.5033333+00:00

    Hello,

    To keep Flyout always open, you need to use FlyoutBehavior.

    <Shell
        Shell.FlyoutBehavior="{OnPlatform WinUI=Locked}"
        >
    

    Locked – indicates that the flyout can't be closed by the user, and that it doesn't overlap content.

    Best Regards,

    Alec Liu.


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    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

0 additional answers

Sort by: Most helpful

Your answer

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