Git Product home page Git Product logo

prototype.forms.controls's Introduction

Prototype.Forms.Controls

This sample app contains a random mixture of Xamarin/Xamarin.Forms controls, views, and functionality snippets that I've created.

Table of Contents

  1. ToggleButton
  2. Checkbox
  3. Checkbox List
  4. Collapsible/Expandable (Accordion) List
  5. Editable Label
  6. ListView with TappedCommand
  7. ListView with Infinite Scroll
  8. RadioButtonList
  9. TabControl with Collapsible/Expandable capabilities

ToggleButton

A ToggleButton is a control that allows for switching back and forth between images (e.g. 'checked' and 'unchecked' below). ToggleButton inherits from Xamarin.Forms.Button.

<controls:ToggleButton 
            x:Name="toggleButton"
            CheckedImage="checked"
            UnCheckedImage="unchecked"
            Enabled="true"
            Animate="false"
            Command="{Binding Source={x:Reference CheckboxControl}, Path=CheckedCommand }" />

Checkbox

The Checkbox control is essentially a StackLayout that contains a ToggleButton and Label.

<controls:Checkbox Text="{Binding CheckboxTitle}" 
                   IsChecked="{Binding IsChecked}" 
                   CheckedCommand="{Binding OnCheckedCommand}" />

Coming Soon: Overridable SkiaSharp (default) implementations for Checked/Unchecked states in place of where images are currently required. This will eliminate the need for any platform additions (images).

CheckboxList

The CheckboxList control inherits from Xamarin.Forms.ListView and contains a list of Checkbox controls. It allows you to bind a collection of ISelectableItem object implementations, and maintain a list of selected items. CheckboxList contains events and commands observing changes to the CheckboxList items.

<controls:CheckboxList ItemsSource="{Binding Items}" 
                       SelectedItems="{Binding SelectedItems}" />

Note: The CheckboxList control also contains functionality for selecting/de-selecting all of the checkboxes in the list. (Documentation and samples coming soon for this).

Collapsible/Expandable (Accordion) List

(Coming soon!)

Editable Label

(Coming soon!)

ListView with Item Tapped Command

(Coming soon!)

ListView with Infinite Scroll

(Coming soon!)

RadioButtonList

The RadioButtonList inherits from StackLayout, and contains a list of RadioButton controls. The ItemsSource property within the RadioButtonList expects IEnumerable<string>. The collection of strings is used to create the RadioButton items contained within the RadioButtonList.

<controls:RadioButtonList ItemsSource="{Binding Items}" ItemSelectedCommand="{Binding ItemSelectedCommand}" />

Note: The RadioButton control requires custom renderering within the iOS and Android projects.

Coming Soon: I will be expanding the functionality of the to allow for more options (i.e. pre-selecting radio button items, custom selected/unselected formatting, etc.)

TabControl with Collapsible/Expandable capabilities

(Coming soon!)

prototype.forms.controls's People

Contributors

rhedgpeth avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

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.