/// <summary>
 /// Default ctor
 /// </summary>
 internal XmlResourceCompletion(IGlyphService glyphService, string displayText, string insertionText, string description, int moveBackPositions, XmlResourceCompletionType type)
     : base(insertionText)
 {
     DisplayText       = displayText;
     InsertionText     = insertionText;
     Description       = description;
     IconSource        = GetIconSource(glyphService, type);
     MoveBackPositions = moveBackPositions;
     Type = type;
 }
        /// <summary>
        /// Gets the icon for this completion.
        /// </summary>
        private static ImageSource GetIconSource(IGlyphService glyphService, XmlResourceCompletionType type)
        {
            StandardGlyphGroup stdGlyph;

            switch (type)
            {
            case XmlResourceCompletionType.Element:
                stdGlyph = StandardGlyphGroup.GlyphXmlChild;
                break;

            case XmlResourceCompletionType.Attribute:
                stdGlyph = StandardGlyphGroup.GlyphXmlAttribute;
                break;

            default:
                stdGlyph = StandardGlyphGroup.GlyphXmlItem;
                break;
            }
            return(glyphService.GetGlyph(stdGlyph, StandardGlyphItem.GlyphItemPublic));
        }