Skip to content

stormlion227/SNavigation.Forms

Repository files navigation

SNavigation.Forms

SNavigation(Xamarin.Forms) allows you to put any elements on navigation bar.

NuGet

Supports Android and iOS.

Screen-Shots

SNavigation Android SNavigation iOS

Setup

  • Install the nuget package in portable and all platform specific projects.

Android

In MainActivity.cs file

Stormlion.SNavigation.Droid.Platform.Init(this);

iOS

In AppDelegate.cs file

Stormlion.SNavigation.iOS.Platform.Init();

Usage

MainPage = new SNavigationPage(new Page1())
{
    BarBackgroundColor = Color.SkyBlue,
};
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage x:Class="Test.Page1"
             xmlns="http://xamarin.com/schemas/2014/forms"
             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
             xmlns:snav="clr-namespace:Stormlion.SNavigation;assembly=Stormlion.SNavigation">
    <snav:SNavigationPage.NavContent>
        <Grid Margin="50,0,50,0">
            <SearchBar BackgroundColor="White" Placeholder="Search ..." />
        </Grid>
    </snav:SNavigationPage.NavContent>
    <ContentPage.Content>
        ...
    </ContentPage.Content>
</ContentPage>
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage x:Class="Test.Page2"
             xmlns="http://xamarin.com/schemas/2014/forms"
             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
             xmlns:snav="clr-namespace:Stormlion.SNavigation;assembly=Stormlion.SNavigation">
    <snav:SNavigationPage.NavContent>
        <Grid Margin="50,0,50,0">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="1*" />
                <ColumnDefinition Width="1*" />
                <ColumnDefinition Width="1*" />
            </Grid.ColumnDefinitions>
            <BoxView Grid.Column="0" BackgroundColor="LightGray" />
            <BoxView Grid.Column="1" BackgroundColor="LightBlue" />
            <BoxView Grid.Column="2" BackgroundColor="Orange" />
        </Grid>
    </snav:SNavigationPage.NavContent>
    <ContentPage.Content>
        ...
    </ContentPage.Content>
</ContentPage>

Contributions

Contributions are welcome!

About

You can put any controls on NavigationBar.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages