public void OnTagRemoved(string tag)
        {
            // Invoke feature tracking if it was requested
            if (null != TagFeature_Remove)
            {
                FeatureTrackingManager.Instance.UseFeature(TagFeature_Remove);
            }

            HashSet <string> tags = TagTools.ConvertTagBundleToTags(TagsBundle);

            tags.Remove(tag);
            TagsBundle = TagTools.ConvertTagListToTagBundle(tags);
        }
        private void ObjAddControl_OnNewTag(string tag)
        {
            HashSet <string> tags = TagTools.ConvertTagBundleToTags(TagsBundle);

            tags.Add(tag);
            TagsBundle = TagTools.ConvertTagListToTagBundle(tags);

            // Invoke feature tracking if it was requested
            if (null != TagFeature_Add)
            {
                FeatureTrackingManager.Instance.UseFeature(TagFeature_Add);
            }
        }
        private void RebuildTagItems()
        {
            string        tags_string = TagsBundle;
            List <string> tags        = new List <string>(TagTools.ConvertTagBundleToTags(tags_string));

            tags.Sort();

            // Clear out the old tags
            List <TagEditorItemControl> old_tags = new List <TagEditorItemControl>(ObjTagsPanel.Children.OfType <TagEditorItemControl>());

            old_tags.ForEach(o => ObjTagsPanel.Children.Remove(o));

            foreach (string tag in tags)
            {
                ObjTagsPanel.Children.Add(new TagEditorItemControl(tag, OnTagRemoved));
            }

            TagManager.Instance.ProcessTags(tags);
        }