Ejemplo n.º 1
0
        /// <summary>
        /// Add tag to the list
        /// </summary>
        /// <param name="tag">tag string to add</param>
        public void AddTag(string tag)
        {
            if (string.IsNullOrEmpty(tag))
            {
                return;
            }

            TagList.Add(tag);
            var newTagLabel = new TagLabelControl(tag);

            newTagLabel.OnRemoved += OnTagLabelControlRemoved;

            Controls.Add(newTagLabel);

            OnTagListUpdated.Raise(this, null);
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Tag label removed handler
 /// </summary>
 /// <param name="control">Control to be removed</param>
 void OnTagLabelControlRemoved(TagLabelControl control)
 {
     TagList.Remove(control.TagText);
     OnTagListUpdated.Raise(this, null);
 }