0

Currently i am trying to add offline banner in between Status bar and Navigation bar.

<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
             x:Class="OfflineBannerDemo.BasePage"
             x:Name="basePageCodeBehind">
    
    <ContentPage.Content>
        <Grid>
            <!-- MainContent -->
            <ContentView x:Name="MainContentView"
                             BackgroundColor="Blue"
                             Content="{Binding Source={x:Reference basePageCodeBehind}, Path=MainContent}" />
            <!-- ConnectivityView -->
            <Grid x:Name="connectivityGrid"
                      VerticalOptions="Start"
                      Opacity="0"
                      InputTransparent="True"
                      BackgroundColor="Red"
                      HeightRequest="25">
                <Label Text="Offline"
                           VerticalOptions="Center"
                           VerticalTextAlignment="Center"
                           HorizontalTextAlignment="Center"
                           FontSize="Small"
                           TextColor="White"
                            />
            </Grid>
        </Grid>
    </ContentPage.Content>
</ContentPage>

using about code i manage to display it below the Navigation Bar as below

enter image description here

If there is anyway to add this in between status bar and Navigation bar please let me know.

Thank You.

Chandu Ranwala
  • 305
  • 1
  • 4
  • 18

0 Answers0