BrightIdeasSoftware.TreeListView.TreeRenderer.DrawExpansionGlyphStyled C# (CSharp) Method

DrawExpansionGlyphStyled() protected method

Draw the expansion indicator using styles
protected DrawExpansionGlyphStyled ( Graphics g, Rectangle r, bool isExpanded ) : void
g System.Drawing.Graphics
r System.Drawing.Rectangle
isExpanded bool
return void
            protected virtual void DrawExpansionGlyphStyled(Graphics g, Rectangle r, bool isExpanded)
            {
                VisualStyleElement element = VisualStyleElement.TreeView.Glyph.Closed;
                if (isExpanded)
                    element = VisualStyleElement.TreeView.Glyph.Opened;
                VisualStyleRenderer renderer = new VisualStyleRenderer(element);
                renderer.DrawBackground(g, r);
            }