All Projects → nmilcoff → TagsView

nmilcoff / TagsView

Licence: MIT license
Simple and highly customizable Xamarin.iOS tag list view. Originally inspired by https://github.com/ElaWorkshop/TagListView

Programming Languages

C#
18002 projects

Projects that are alternatives of or similar to TagsView

Autocomplete
Blazing fast and lightweight autocomplete widget without dependencies. Only 1KB gzipped. Demo:
Stars: ✭ 244 (+1120%)
Mutual labels:  widget
rater-js
Star rating widget for the browser. Unlimited number of stars. No dependencies. No Jquery required.
Stars: ✭ 66 (+230%)
Mutual labels:  widget
ProgressBar
Beautiful progress bar for android
Stars: ✭ 62 (+210%)
Mutual labels:  widget
Pagerbeauty
📟✨ PagerDuty on-call widget for monitoring dashboard. Datadog and Grafana compatible
Stars: ✭ 250 (+1150%)
Mutual labels:  widget
ios-scriptable-tsx
在 vscode 上使用 typescript 和 jsx 开发 ios 小组件的小框架.基于 Scriptable app.
Stars: ✭ 113 (+465%)
Mutual labels:  widget
Qt-Timeline-Widget
[Qt控件] 时间轴列表控件
Stars: ✭ 43 (+115%)
Mutual labels:  widget
Form Render
🚴‍♀️ 阿里飞猪 - 很易用的中后台「表单 / 表格 / 图表」解决方案
Stars: ✭ 3,881 (+19305%)
Mutual labels:  widget
telekom-data-usage-widget
Telekom Datennutzung Widget für iOS 14
Stars: ✭ 61 (+205%)
Mutual labels:  widget
adb-toggle
A homescreen widget to toggle USB debugging on/off
Stars: ✭ 20 (+0%)
Mutual labels:  widget
instagram-widget-by-wpzoom
The easiest way to add a nice Instagram widget on your WordPress site. It just works!
Stars: ✭ 22 (+10%)
Mutual labels:  widget
Yii2 Imperavi Widget
Imperavi Redactor widget for Yii 2
Stars: ✭ 250 (+1150%)
Mutual labels:  widget
yii2-grid-view-library
Highly enhanced GridView widget and grid components for Yii2
Stars: ✭ 57 (+185%)
Mutual labels:  widget
orderable stack
A Flutter orderable stack widget
Stars: ✭ 83 (+315%)
Mutual labels:  widget
Finalcut
A text-based widget toolkit
Stars: ✭ 244 (+1120%)
Mutual labels:  widget
js-year-calendar
A fully customizable year calendar widget
Stars: ✭ 164 (+720%)
Mutual labels:  widget
Wiredash Sdk
Interactive user feedback tool for Flutter 🎉
Stars: ✭ 232 (+1060%)
Mutual labels:  widget
SyntaxPane
A simple to use Swing JEditorKit component supporting syntax highlighting for various languages. Issue tracker: https://codeberg.org/sciss/SyntaxPane/issues
Stars: ✭ 32 (+60%)
Mutual labels:  widget
notebookJS
notebookJS: seamless JavaScript integration in Python Notebooks
Stars: ✭ 149 (+645%)
Mutual labels:  widget
covid-ampel-widget
🚦 Ampel Widget, um die aktuellen 🦠Corona-Zahlen (Inzidenz) des RKI für die Landkreise in 🇩🇪 Deutschland auf dem Smartphone anzuzeigen
Stars: ✭ 15 (-25%)
Mutual labels:  widget
wui
Collection of GUI widgets for the web
Stars: ✭ 44 (+120%)
Mutual labels:  widget

TagsView

Build status

Package Name Version
TagsView NuGet
MvxTagsView NuGet

Simple and highly customizable Xamarin.iOS tag list view. Originally inspired by https://github.com/ElaWorkshop/TagListView

Customizable features:

  • Left/Center/Right alignment
  • Font
  • X/Y Margins
  • X/Y Paddings
  • Text color
  • Background text color
  • Tag corner radius
  • Tag border color
  • Tag border width
  • Tag border color
  • Tag controls distance
  • Tag icon
  • Tag icon size
  • Tag icon color
  • Tag selected event
  • Tag button tapped event

Screenshot

Download & Install

Get it on Nuget!

TagsView

MvxTagsView

Requirements

iOS 9+

Features and usage

It's super simple to get started:

public class ViewController : UIViewController
{
    private TagListView tagsView;

    public override void ViewDidLoad()
    {
        // code
        this.tagsView = new TagListView()
        {
            // you can customize properties here!
        };

        this.View.AddSubview(this.tagsView);

        this.View.AddConstraints(        
            // Add your constraints!
        );

        // you can attach a source object to each tag
        var myObject = new MyModel { Title = "I'm a MyModel!" };
        this.tagsView.AddTag(myObject.Title, myObject); 

        // but, if none is provided, it will be the text string 
        this.tagsView.AddTag("I'm a simple tag!"); 
    }
}

By default, TagsView will display a button next to the text of the tag. To prevent this, you can pass the value false for the parameter enableTagButton in its constructor.

As explained in the code snippet, each tag can contain a source object. These will be available for you on the events the control exposes:

  • TagSelected: User tapped a tag.
  • TagButtonTapped: User tapped a tag button.

There are also a lot of properties available for you to customize the look & feel:

Feature Property Type
Alignment Alignment TagsAlignment
Text color TagTextColor UIColor
Tag background color TagBackgroundColor UIColor
Font TextFont UIFont
Tag corner radius CornerRadius float
Tag border width BorderWidth float
Tag border color BorderColor UIColor
Padding Y PaddingY float
Padding X PaddingX float
Margin Y Margin Y float
Margin X Margin X float
Distance between text and button ControlsDistance float
Button size TagButtonSize float
Button color TagButtonColor UIColor
Button icon ButtonIcon UIImage

MvvmCross version

If you are using MvvmCross, you can take advantage of MvxTagListView!

public class ViewController : UIViewController
{
    // declare a MvxTagListView using MyObject as items type
    private MvxTagListView<MyObject> mvxTagsView;

    public override void ViewDidLoad()
    {
        // You need to specify how MyObject can be translated to a string in the ctor!
        this.mvxTagsView = new MvxTagListView<MyObject>(
            myObject => myObject.Title)
        {
            // you can customize properties here!
        };

        this.View.AddSubview(this.mvxTagsView);

        this.View.AddConstraints(        
            // Add your constraints!
        );

        var set = this.CreateBindingSet<FirstView, FirstViewModel>();
        // In this case, YourSource should be an ObservableCollection<MyObject>
        set.Bind(this.mvxTagsView).For(v => v.ItemsSource).To(vm => vm.YourSource); 
        // MyObjectTagSelectedCommand should be a IMvxCommand<MyObject>
        set.Bind(this.mvxTagsView).For(v => v.TagSelectedCommand).To(vm => vm.MyObjectTagSelectedCommand);
        // MyObjectTagButtonTappedCommand should be a IMvxCommand<MyObject>
        set.Bind(this.mvxTagsView).For(v => v.TagButtonTappedCommand).To(vm => vm.MyObjectTagButtonTappedCommand);
        set.Apply();
    }
}

As you can see from the code snippet, the control allows you to bind ItemsSource and two commands: TagSelectedCommand, TagButtonTappedCommand.

Using a collection of strings as items source

If your source is just a collection of strings, you should consider using MvxSimpleTagListView, super handy!

public class MvxSimpleTagListView : MvxTagListView<string>
    {
        public MvxSimpleTagListView(bool enableTagButton = true)
            : base(s => s, enableTagButton)
        {
        }
    }

Contribution

Pull requests (and issues) are welcome!

License

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].