I have a problem. I created a Master Detail Page with Shell. But now I want to add an Image to the Navigation bar, so just to be clear: An Image... Not an Icon
Here is my code now:
<?xml version="1.0" encoding="utf-8" ?>
<Shell xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:local="clr-namespace:MyApp"
x:Class="MyApp.SideMenuItems" BackgroundColor="#212121"
FlyoutBackgroundColor="#212121">
<Shell.FlyoutHeader>
<local:SideMenuHeader />
</Shell.FlyoutHeader>
<Shell.ItemTemplate>
<DataTemplate>
<StackLayout HorizontalOptions="StartAndExpand" Orientation="Horizontal" Padding="30, 15, 0, 15">
<Image Source="{Binding Icon}" HeightRequest="35" />
<Label Text="{Binding Title}" TextColor="White" FontSize="Large" VerticalOptions="Center" HorizontalOptions="Start" />
</StackLayout>
</DataTemplate>
</Shell.ItemTemplate>
<FlyoutItem Title="SideNav"
Shell.TabBarIsVisible="False"
FlyoutDisplayOptions="AsMultipleItems">
<ShellContent Title="Home" Icon="Home_Dark.png" IsTabStop="true" ContentTemplate="{DataTemplate local:HomePage}"/>
<ShellContent Title="Search" Icon="Search_Dark.png" IsTabStop="true" ContentTemplate="{DataTemplate local:HomePage}" />
<ShellContent Title="Messages" Icon="Chats_Dark.png" IsTabStop="true" ContentTemplate="{DataTemplate local:HomePage}" />
<ShellContent Title="Favorites" Icon="Favorites_Dark.png" IsTabStop="true" ContentTemplate="{DataTemplate local:HomePage}" />
<ShellContent Title="Settings" Icon="Settings_Dark.png" IsTabStop="true" ContentTemplate="{DataTemplate local:HomePage}" />
</FlyoutItem>
</Shell>
How can I add an image to the top navigation bar in the center?
I tried this:
<Shell.TitleView>
<Image Source="Title_Dark.png" HeightRequest="30" VerticalOptions="CenterAndExpand" />
</Shell.TitleView>
But no image on screen?
