Image:
I would like to add a frame to toolbar in Xamarin forms. But toolbar is not accepting.
You cannot add a frame as a Toolbar Item.
You can use, for example the TitleView and customize the whole NavigationView yourself.
For example:
<?xml version="1.0" encoding="utf-8" ?> <ContentPage xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:local="clr-namespace:TitleViewSample" x:Class="TitleViewSample.MainPage"> <NavigationPage.TitleView> <StackLayout Orientation="Horizontal"> <Label Text="Hello World" HorizontalOptions="Center"/> <Frame BackgroundColor="Yellow" HorizontalOptions="End"/> </StackLayout> </NavigationPage.TitleView> </ContentPage>
Copyright © 2021 Jogjafile Inc.
You cannot add a frame as a Toolbar Item.
You can use, for example the TitleView and customize the whole NavigationView yourself.
For example: