AccentOccurrences.AccentGlyphFactory.GenerateGlyph C# (CSharp) Method

GenerateGlyph() public method

public GenerateGlyph ( IWpfTextViewLine line, IGlyphTag tag ) : UIElement
line IWpfTextViewLine
tag IGlyphTag
return System.Windows.UIElement
        public UIElement GenerateGlyph(IWpfTextViewLine line, IGlyphTag tag)
        {
            // Ensure a glyph can be drawn for this marker
            if (tag == null || !(tag is AccentBoxOccurrences))
            {
                return null;
            }

            IEditorFormatMap map = FormatMapService.GetEditorFormatMap(View);
            ResourceDictionary dict = map.GetProperties(Constants.GLYPH_FORMAT_NAME);

            System.Windows.Shapes.Ellipse ellipse = new Ellipse();
            ellipse.Fill = (SolidColorBrush)dict[EditorFormatDefinition.BackgroundBrushId];
            ellipse.StrokeThickness = 2;
            ellipse.Stroke = (SolidColorBrush)dict[EditorFormatDefinition.ForegroundBrushId];
            ellipse.Height = glyphSize;
            ellipse.Width = glyphSize;

            return ellipse;
        }
AccentGlyphFactory