0
votes

I'm trying to implement the TagEntry in Xamarin.Forms but I'm unable to do it. Please can someone redirect me to the right place? Or if there is any other way we can do that in Xamarin Forms. Anything like this will be of great help.

GitHub: https://github.com/daniel-luberda/DLToolkit.Forms.Controls/tree/master/TagEntryView

enter image description here

Things I've done till now

  1. Replicated the entire code in my code.
  2. on the xaml I;ve added a the control of type TagEntryView

    using App1.Controls; using NokariMahamandal.Models; using System; using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.Text; using System.Threading.Tasks;

    using Xamarin.Forms;

    namespace App1.View { public partial class Services : ContentPage { public Candidate candidate { get; set; } public ObservableCollection skills = new ObservableCollection();

        public Services()
        {
            skills.Add("Samples");
            skills.Add("Samples2");
            Bar.TagItems = skills;
            InitializeComponent();
    
        }
        public Services(Candidate cand)
        {
            InitializeComponent();
            candidate = cand;
            var foo = new TagEntryView();
        }
    }
    

    }

Xaml code

<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
              xmlns:dltoolkit="clr-namespace:DLToolkit.Forms.Controls;assembly=DLToolkit.Forms.Controls.TagEntryView"
             xmlns:uc="clr-namespace:App1.Controls; assebmly=App1"
             x:Class="App1.View.Services">
  <Label Text="{Binding MainText}" VerticalOptions="Center" HorizontalOptions="Center" />
  <ContentPage.Content>
    <ScrollView>
      <StackLayout>
        <uc:TagEntryView x:Name="Bar" TagItems="{Binding ConnectionType}" Text="Sample"></uc:TagEntryView>
      </StackLayout>

    </ScrollView>
  </ContentPage.Content>
</ContentPage>
1
@GeraldVersluis I've tried followingAkshay Halasangi
<StackLayout> <uc:TagEntryView x:Name="Bar" TagItems="{Binding ConnectionType}" Placeholder="Sample text here!" ></uc:TagEntryView> </StackLayout> in code behind Bar.TagEntry.Text = "Sample";Akshay Halasangi
I think you could better update your questionGerald Versluis
Thanks will do. However I'm not sure what to do next. @GeraldVersluis can you guide me?Akshay Halasangi
@GeraldVersluis Please check the code that I've added and let me know what i need to do next.Akshay Halasangi

1 Answers