Giter VIP home page Giter VIP logo

pxtabs's Introduction

Not Maintained!

Xamarin Forms now implements the ability to create tab layouts. This package still works well if you want a more customized tab ayout.

PXTabs

  • A tab layout that is more customizable and easier to use than trying to implement the native layouts.
  • Written entirely in Forms with no native code.
  • Check out the TabsPage in the examples for implementation.

NuGet

https://www.nuget.org/packages/Plugin.ProXamTabs

Implementation

All properties are bindable.

PXTabsView

  1. If implementing in Xaml, add the namespace xmlns:pxTabs="clr-namespace:Plugin.ProXamTabs.Shared;assembly=Plugin.ProXamTabs"".
  2. Add the view to your page, set the tab bar on top or bottom by setting IsTabBarOnTop:
<pxTabs:PXTabsView
    x:Name="tabsView"
    BorderColor="Teal"
    SliderColor="Teal"
    IsBorderOnBottom="False"
    IsBorderVisible="True"
    IsSliderOnBottom="False"
    IsSliderVisible="True"
    IsTabBarOnTop="False"/>
  1. Create a list of PXTabs and and them to the tab view: tabsView.Tabs = [YourListOfTabs];, or bind the list directly. The PXTab is fully customisable:
new PXTab()
{
    TabId = 1,
    TabView = new HomeView(),
    Text = "Home",
    SelectedImage = "tab_home",
    UnselectedImage = "tab_home_gray",
    SelectedColor = Color.Gray,
    UnSelectedColor = Color.Black,
    TextSize = 12,
    ImageSize = 24,
    BadgeCount = 3,
    BadgeColor = Color.Blue
};
  1. Setting the TabView property of a PXTab will be the view that will be shown when the tab is selected.

PXTabsLayout

If you do not want the PXTabsView to handle the switching of the views, you can simply use the PXTabsLayout which will give you the tab bar that you can place anywhere in your view. Use the Command<PXTab> TabSelectedCommand property to detect the change in tab selection.

Screenshots

iOS

alt text

Android

alt text

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.