I have a Maui application with flyout menu. Additional I like to have a button on the Shell at the right end "profile". From there the ProfilePage should be opened. (instead using the flyout menu).
How should I implement the button at the shell?
How should I handle the click event (or ICommand) to open the ProfilePage?
I tried using the TitleView (also ItemTemplate and ToolbarItems), but the page title gets lost (I like to keep the standard), the button is not on the right end and I can't find out how to navigate to ProfilePage by clicking the button:
<Shell
x:Class="Mandatos.AppShell"
xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:views="clr-namespace:MyProject.Views"
FlyoutBehavior="Flyout" >
<Shell.TitleView >
<HorizontalStackLayout>
<Label FontSize="30" Margin="30" Text="{Binding Title}" />
<Button Text="Profile" WidthRequest="100" HorizontalOptions="End"
Clicked="Button_OnClicked" BackgroundColor="red"/>
</HorizontalStackLayout>
</Shell.TitleView>
<FlyoutItem Title="First" >
<ShellContent ContentTemplate="{DataTemplate views:FirstPage}" />
</FlyoutItem>
<FlyoutItem Title="Second">
<ShellContent ContentTemplate="{DataTemplate views:SecondPage}" />
</FlyoutItem>
<!-- more pages.. -->