Skip to content

Tab Strip control for Xamarin.Forms

License

Notifications You must be signed in to change notification settings

surgeforward/TabStrip

 
 

Repository files navigation

TabStrip for Xamarin.Forms

Tab Strip control for Xamarin.Forms

Setup

  • Available on NuGet: Not yet released
  • Install into your PCL/.NET Standard and Client Projects

Build

Platform Support

TabStrip is available for use in Xamarin.Forms only targetting the following supported platforms.

Platform Supported Version
Xamarin.Android Yes API 25 +
Xamarin.iOS Yes iOS 10 +
Xamarin 10 UWP Yes 16299 +
macOS No
linux No
tvOS No
watchOS No
  • Project still in development no NuGet releases yet

Usage

iOS and Droid

Initialize the renderers in your iOS and Android projects

Xamarin.Forms.Init();
TabStripRenderer.Init();

XAML:

Add the namespace in the xmlns:

xmlns:plugin="clr-namespace:TabStrip.FormsPlugin.Abstractions;assembly=TabStrip.FormsPlugin.Abstractions"

Add the control:

<plugin:TabStripControl Position="{Binding CurrentPosition}"
                        ItemsSource="{Binding Views}" />

Add the following code to your BindingContext. The ItemsSource property needs to be mapped to an IEnumerable<TabModel> where TabModel is provided in the TabStrip.FormsPlugin.Abstractions namespace.

BindingContext = new 
{
	Views = new ObservableCollection<TabModel>(new [] 
	{
		new TabModel
        {
            Header = (new HeaderView(), new { Title = "Tab 1" }),
            View = (new HelloView(), new HelloPageModel())
        },
        new TabModel
        {
            Header = (new HeaderView(), new { Title = "Tab 2" }),
            View = (new HelloView(), new HelloPageModel())
        }

	});
};

Bindable Properties

Property Description Default Value
Position Gets or Sets current tab position of the tab strip. 0
ItemsSource Gets or Sets the IEnumerable<TabModel> where the TabModel defines the Tab Name and the View/ViewModel relationship for each Tab null
ShowArrows Gets or Sets the bool value that determines if navigation arrows will appear on top of the content area fakse
LeftArrow Gets or Sets the ImageSource for the LeftArrow which is displayed when the tab can navigate left Embedded Left Arrow Image
RightArrow Gets or Sets the ImageSource for the RightArrow which is displayed when the tab can navigate right Embedded Right Arrow Image

Release Notes

  • Not released yet

Roadmap

Minimal Viable Product

  • Implement basic cross-platform Tabstrip that supports Android and iOS via Xamarin.Forms

Windows Support

  • Implement Windows UWP support via Xamarin.Forms

macOS Support

  • Implement macOS support via Xamarin.Forms

linux Support

  • Implement linux support via Xamarin.Forms

Native Support

  • Implement Xamarin Navite support so it can be consumed in a Xamarin Native project instead of Xamarin.Forms. This will require a larger code re-write since it will be using Xamarin.Forms wrappers prior to this release

Created By: @Andrew_Hoefling

History

Xamarin Dependencies

Thanks to other plugin creators to make this plugin possible

License

The MIT License (MIT) see License File

About

Tab Strip control for Xamarin.Forms

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 91.4%
  • PowerShell 6.2%
  • Shell 2.4%