Esteban Chornet
Esteban Chornet

Reputation: 1237

How to customize xamarin forms UWP top bar

I am trying to do a toolbar as this image (app topbar):

enter image description here

I want to add buttons cancel & save as it's shown in the image above. I am trying to do it with ToolbarItems, but I get [...] button, which actually acts as "dropdown".

enter image description here

Is there any way to make it as first image? Thanks.

Upvotes: 0

Views: 271

Answers (1)

ColeX
ColeX

Reputation: 14463

As sermet mentioned , you could use NavigationPage.TitleView , the usage is pretty simple .

  <NavigationPage.TitleView>
    <Grid HorizontalOptions="FillAndExpand">
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="100"/>
            <ColumnDefinition Width="*"/>
            <ColumnDefinition Width="100"/>
        </Grid.ColumnDefinitions>

        <Button Text="Cancel" />
        <Label Text="Example Title" FontSize="Large" Grid.Column="1" HorizontalTextAlignment="Center"/>
        <Button Text="Save" Grid.Column="2"/>
    </Grid>
</NavigationPage.TitleView>

enter image description here

Update

enter image description here

Upvotes: 1

Related Questions