• Stars
    star
    141
  • Rank 259,971 (Top 6 %)
  • Language
    C#
  • License
    MIT License
  • Created over 5 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

This is a breadcrumb navigation control that is complete automatic and uses the Navigation stack and page titles to generate the breadcrumbs.
โš ๏ธ This NuGet/ repo is now in maintenance mode and support will end once xamarin.forms is no longer supported. Bug fixes only.
MAUI repo - https://github.com/IeuanWalker/Maui.Breadcrumb

Xamarin.Forms.Breadcrumb Nuget Nuget

License: MIT Codacy Badge

This is a breadcrumb navigation control that is completely automatic and uses the Navigation stack to get the page titles to generate the breadcrumbs.

The animation for the control is based on this article - A Cool Breadcrumbs Bar with Xamarin Forms Animationsโ€ฆ

Basic example Production Example
Example gif Production Example gif

How to use it?

Install the NuGet package into all of your projects

Install-Package Xamarin.Forms.Breadcrumb

For iOS add the following to AppDelegate.cs > FinishedLaunching

BreadcrumbButtonRenderer.Init();

To add to a page the first thing we need to do is tell our XAML page where it can find the Breadcrumb control, which is done by adding the following attribute to our ContentPage:

<ContentPage x:Class="DemoApp.Pages.BasePage"
             xmlns="http://xamarin.com/schemas/2014/forms"
             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
             xmlns:breadcrumb="clr-namespace:Breadcrumb;assembly=Breadcrumb"
             xmlns:d="http://xamarin.com/schemas/2014/forms/design"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
             mc:Ignorable="d">
    <ContentPage.Content>
        ...
    </ContentPage.Content>
</ContentPage>

Next up, just add the breadcrumb control onto that page and you're all set.

<breadcrumb:Breadcrumb Padding="15" VerticalOptions="Start" />

What can I do with it?

Property What it does Extra info
Separator Sets the image source of the separator This allows you to set the separator to FontImageSource, UriImageSource or FileImageSource.
Default is new FontImageSource { Glyph = " / ", Color = Colors.Black, Size = 15, }
FirstBreadcrumb Allows you to override the first breadcrumb and set an image source. F.e. This is usefull if you want the first breadcrumb to be a home icon instead of the default title. Default will be a label like all the other breadcrumbs
ScrollBarVisibility Sets the HorizontalScrollBarVisibility of the scrollview More info here ScrollBarVisibility. Default value is ScrollBarVisibility.Never
FontSize Sets the text font size for the breadcrumb Default value is 15.
Support NamedSize
TextColor Sets the text color for the breadcrumb and seperator A Color object.
Default value is black.
(doesnt include the last breadcrumb)
CornerRadius A CornerRadius object representing each individual corner's radius for each breadcrumb. Uses the CornerRadius struct allowing you to specify individual corners.
Default value is 10.
(doesnt include the last breadcrumb)
BreadcrumbMargin A Thickness object used to define the spacing between the breadcrumb and separators Uses the Thickness struct allowing you to specify left, top, right and bottom margin
BreadcrumbBackgroundColor This is the background color for the individual breadcrumbs A Color object.
Default value is Transparent.
(doesnt include the last breadcrumb)
LastBreadcrumbTextColor Sets the text color for the last breadcrumb A Color object.
Default value is black.
LastBreadcrumbCornerRadius A CornerRadius object representing each individual corner's radius. Uses the CornerRadius struct allowing you to specify individual corners.
Default value is 10.
LastBreadcrumbBackgroundColor Sets the background color of the last breadcrumbs A Color object.
Default value is Transparent.
AnimationSpeed Sets the speed of the animated breadcrumb Default value is 800.
Set to 0 to disable the animation.
IsNavigationEnabled Used to remove the tab gesture from breadcrumbs Default value is True

First breadcrumb customization

You are able to change the first breadcrumb to an Icon, embedded image or url image. It implements the Xamarin.Forms ImageSource object.

<breadcrumb:Breadcrumb Padding="15" VerticalOptions="Start">
    <breadcrumb:Breadcrumb.FirstBreadCrumb>
        <FontImageSource FontFamily="{StaticResource FontAwesome}"
                            Glyph="{x:Static icons:IconFont.Home}"
                            Size="35"
                            Color="Red" />
    </breadcrumb:Breadcrumb.FirstBreadCrumb>
</breadcrumb:Breadcrumb>

Separator customization

You are able to change the separators to an Icon, embedded image or url image. It implements the Xamarin.Forms ImageSource object.

Font - (FontAwesome)

<breadcrumb:Breadcrumb Padding="15" VerticalOptions="Start">
    <breadcrumb:Breadcrumb.Separator>
        <FontImageSource FontFamily="{StaticResource FontAwesome}"
                            Glyph="{x:Static icons:IconFont.ChevronRight}"
                            Size="15"
                            Color="Red" />
    </breadcrumb:Breadcrumb.Separator>
</breadcrumb:Breadcrumb>

Image - URL

<breadcrumb:Breadcrumb Padding="15" VerticalOptions="Start">
    <breadcrumb:Breadcrumb.Separator>
        <UriImageSource Uri="https://cdn.iconscout.com/icon/free/png-256/xamarin-4-599473.png" />
    </breadcrumb:Breadcrumb.Separator>
</breadcrumb:Breadcrumb>

Image - Embedded

<breadcrumb:Breadcrumb Padding="15" VerticalOptions="Start">
    <breadcrumb:Breadcrumb.Separator>
        <FileImageSource File="exampleImage.png" />
    </breadcrumb:Breadcrumb.Separator>
</breadcrumb:Breadcrumb>

More Repositories

1

Maui.Breadcrumb

This is a breadcrumb navigation control that is complete automatic and uses the Navigation stack and page titles to generate the breadcrumbs. It's also 100% accessible by default..
C#
103
star
2

Maui.StateButton

With this control, you are able to create any style of button. This is possible as it acts as a wrapper to your XAML and provides you the events/ commands and properties to bind to. It's also 100% accessible by default.
C#
86
star
3

Maui.Switch

Simple control to create custom switches in .NET MAUI
C#
84
star
4

Xamarin.Forms.CustomSwitch

Simple control to create custom switches in Xamarin.Forms
C#
44
star
5

GeoUK

This is a simple to use Geodetic Library for .Net that will allow simple transformation to and from British National Grid.
C#
15
star
6

Xamarin.Forms.StateButton

With this control, you are able to create any style of button. This is possible as it acts as a wrapper to your XAML and provides you the events/ commands and properties to bind to.
C#
14
star
7

Email.io

C#
8
star
8

Dissertation-Project

This is the web application that i have created for my dissertation.
JavaScript
5
star
9

Semantic-Web-Book-Search-Application

Project from University where i created a web application that sources data using semantic web technologies.
JavaScript
4
star
10

SPARQL-Query-creator-using-NLP

Console version of my web application for my disseration
C#
2
star
11

IeuanWalker.AccessibilityHelpers

C#
2
star
12

Hangfire.RecurringJob

Automatically generates the recurring job registration code using source generators
C#
1
star
13

Maui.PdfViewer

C#
1
star
14

POCHeic

C#
1
star
15

BankingApplication

Java
1
star
16

IBM-Watson-JavaFX-Project

Java
1
star