Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/chaosifier/TabView

TabView control for Xamarin.Forms.
https://github.com/chaosifier/TabView

Last synced: 29 days ago
JSON representation

TabView control for Xamarin.Forms.

Awesome Lists containing this project

README

        

# TabView
TabView control for Xamarin.Forms.

Requires CarouselView plugin.

Also available on NuGet : https://www.nuget.org/packages/Xam.Plugin.TabView [![NuGet](https://img.shields.io/badge/NUGET-1.1.1-green.svg)](https://www.nuget.org/packages/Xam.Plugin.TabView)

Make sure to initialize the CarouselView plugin first before using TabView.
To do so, in your iOS and Android projects call:

```
Xamarin.Forms.Init();
CarouselViewRenderer.Init();
```

And in your UWP project call:

```
List assembliesToInclude = new List();
assembliesToInclude.Add(typeof(CarouselViewRenderer).GetTypeInfo().Assembly);
Xamarin.Forms.Forms.Init(e, assembliesToInclude);
```

Bindable properties:
- HeaderBackgroundColor
- HeaderTabTextColor
- ContentHeight
- HeaderSelectionUnderlineColor
- HeaderSelectionUnderlineThickness
- HeaderSelectionUnderlineWidth
- HeaderTabTextFontSize
- HeaderTabTextFontFamily
- HeaderTabTextFontAttributes
- IsSwipeEnabled
- TabHeaderSpacing
- ItemSource (Collection of TabItem)
- TemplatedItemSource (Collection of ITabViewControlTabItem)
- ItemTemplate (works along with TemplatedItemSource)
- TabHeaderItemTemplate (works along with TemplatedItemSource)
- SelectedTabIndex
- TabSizeOption (Sets tab header sizing strategy. Accepts GridLength, namely : Auto, *, some fix width value)

Note :
- ItemSource and TemplatedItemSource cannot be used together.
- TabHeaderItemTemplate only works along with TemplatedItemSource.
- TemplatedItemSource items must implement ITabViewControlTabItem
- ITabViewControlTabItem interface members :
- TabViewControlTabItemFocus() : called when tab receives focus, could be used for lazy loading of data in each tab.
- TabViewControlTabItemIconSource : icon to set for the tab
- TabViewControlTabItemTitle : title to set for the tab

Events:
- OnPositionChanging
- OnPositionChanged

Functions:
- SetPosition
- SelectNext
- SelectPrevious
- SelectLast
- AddTab
- RemoveTab

Screenshots:

TabView preview on UWP
TabView preview on Android