Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 77050

Binding to an array of breadcrumbs

$
0
0

I am new to Xamarin development and am trying to implement bread crumb navigation. I have a string array in the C# code like this:

public static readonly BindableProperty CurrentPathProperty =
    BindableProperty.Create<FileBrowser, string[]>(c => c.CurrentPath, null);

public string[] CurrentPath
{
    get { return GetValue(CurrentPathProperty) as string[]; }
    set { SetValue(CurrentPathProperty, value); }
}

What would be the correct way to bind to the property in XAML (display the bread crumbs and update CurrentPath when one of them is tapped)? I've tried googling ListViews and x:Array but don't see a straightforward way to do this. I know I need a PropertyChanged event handler but it's not clear to me what needs to happen on the XAML side or what the handler would look like.


Viewing all articles
Browse latest Browse all 77050

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>