Skip to content

truongkhanhduy95/XamControls

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Xamarin Native Controls

Xamarin cross-platform ported controls

FluidSlider:



Paper Onboaring:



All credit goes to: https://github.com/Ramotion/

Tag View:



iOS

Usage

  1. Create new TagListView
var tagsView = new TagListView(true)
  {
    PaddingY = 4f,
    TextFont = UIFont.SystemFontOfSize(20f)
  };
  1. Setup control properties
//Samples
tagsView.Alignment = TagsAlignment.Left;
tagsView.CornerRadius = 17f;
tagsView.PaddingX = 5f;
tagsView.PaddingX = 8f;
tagsView.ControlsDistance = 4f;
tagsView.TagBackgroundColor = UIColor.FromRGB(52, 152, 219);
  1. Add new tag
private void BtnAdd_TouchUpInside(object sender, EventArgs e)
{
  if(!string.IsNullOrEmpty(this.input.Text))
  {
    tagsView.AddTag(this.input.Text);
    this.input.Text = string.Empty;
  }
}
  1. Subscribe event listeners
tagsView.TagButtonTapped += (sender, e) =>
{
   tagsView.RemoveTag(e);
};

tagsView.TagSelected += (sender, e) =>
{
   //Do something...                
};

Android

Usage

  1. Create TagView in XML layout file
  <XamControls.Droid.Controls.TagView
      android:id="@+id/tagView"
      android:layout_width="match_parent"
      android:layout_height="wrap_content"
      android:layout_marginEnd="16dp"
      android:layout_marginStart="16dp"/>
var tagView = FindViewById<TagView>(Resource.Id.tagView);
  1. Add tags
var tag = new Controls.Tag("This is tag name");
tag.IsDeletable = true; //Show "x" button
tagView.AddTag(tag);
  1. Setup TagView Listener
tagView.SetOnTagClickListener(new MyOnTagClickListener());
tagView.SetOnTagDeleteListener(new MyOnTagDeleteListener());
tagView.SetOnTagLongClickListener(new MySetOnTagLongClickListenery());

Notification Handler:

iOS

Usage

  1. Configure Firebase in AppDelegate
public override bool FinishedLaunching(UIApplication application, NSDictionary launchOptions)
{
    //...
    Firebase.Core.App.Configure();
            
    return true;
} 
  1. Initial events
private void RegisterFirebaseEvents()
{
    //Ask for permission
    RemoteNotification.Instance.RegisterForReceivingRemoteNotifications(isGranted =>
    {
            //if (isGranted) SaveSetting...
    });

     //Handle token
     FirebaseTokenHandler.Instance.OnRefreshToken = (token) => {
             //Register token to server..
     };

     //Connect
     FirebaseTokenHandler.Instance.ConnectToFCM();
}
  1. Handle recieve remote notificaation
[Export("messaging:didReceiveMessage:")]
public void DidReceiveMessage(Firebase.CloudMessaging.Messaging messaging, Firebase.CloudMessaging.RemoteMessage remoteMessage)
{
     //Handle receiving Remote notification
     RemoteNotification.Instance.DidReceiveRemoteNotification(messaging, remoteMessage);
}

Pincode Dialog:

# Biometric Login

About

A place to keep my Xamarin controls

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages