Action bar height

Asher Cohen 1 Reputation point

How I can set the height of the action bar

The page is called from MasterDetailPage

<?xml version="1.0" encoding="utf-8" ?>  
<MasterDetailPage xmlns=""  
        <OnPlatform ></OnPlatform>  
    <MasterDetailPage.Master >  
        <ContentPage Title="Master">  
            <ContentPage.Content >  
                    <Label Text="תפריט"></Label>  
                    <Button x:Name="btnList" Clicked="btnList_Clicked" Text="רשימה"></Button>  
                    <Button x:Name="btnAdd" Clicked="btnAdd_Clicked" Text="הוסף"></Button>  
                    <Button x:Name="btnExport" Clicked="btnExport_Clicked" Text="יצוא"></Button>  
                    <Button x:Name="btnImport" Clicked="btnImport_Clicked" Text="יבוא"></Button>  
    <MasterDetailPage.Detail >  
        <ContentPage Title="Detail" >  
                <Label Text="MasterDetailPage.Detail"></Label>  


    <NavigationPage.TitleView   >  
        <Grid  >  
                <ColumnDefinition Width="*"/>  
                <ColumnDefinition Width="Auto"/>  
            <Label Text="ספרים"  Grid.Column="0" Grid.Row="0" TextColor="White" FontSize="Large" VerticalOptions="Center" HorizontalOptions="Start"></Label>  
            <StackLayout Grid.Column="1" Grid.Row="0" Style="{x:Null}" HorizontalOptions="EndAndExpand" Orientation="Horizontal" Margin="0,0,5,0">  
                <Button x:Name="butAdd" Clicked="butAdd_Clicked" Text="הוסף" BackgroundColor="DodgerBlue" BorderColor="DodgerBlue" TextColor="White" FontSize="20"></Button>  
                <Button x:Name="butSort" Clicked="butSort_Clicked" Text="מיון" BackgroundColor="DodgerBlue" BorderColor="DodgerBlue" TextColor="White" FontSize="20"></Button>  
A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
5,302 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. JessieZhang-MSFT 7,706 Reputation points Microsoft Vendor


    Welcome to our Microsoft Q&A platform!

    From document MasterDetailPage Class,we could find that MasterDetailPage is obsolete as of version 5.0.0. Please use FlyoutPage instead. So, you can try FlyoutPage .
    For more details, you can check:

    How I can set the height of the action bar

    For android, you can check document NavigationPage Bar Height on Android:
    This Android platform-specific sets the height of the navigation bar on a NavigationPage. It's consumed in XAML by setting the NavigationPage.BarHeight bindable property to an integer value:

    <NavigationPage ...  

    In Ios, you can hide the default NavigationBar in that page and add a custom NavigationBar there, then you can set any height you want to the custom NavigationBar.

    In the Page, hide the default NavigationBar:

    public AboutPage()  

    And then add your custom NavigationBar.

    If you want to change the height of all the navigationBar in your project, you can have a basePage with custom NavigationPage there.

    For more details, you can check:

    Best Regards,

    Jessie Zhang

    If the response is helpful, please click "Accept Answer" and upvote it.

    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.