Exemplo n.º 1
0
        private void DrawHighlight(Geometry g, VisualToolset visualTools, SnapshotSpan span)
        {
            if (g.CanFreeze)
            {
                g.Freeze();
            }

            var            dv       = new DrawingVisual();
            DrawingContext dContext = dv.RenderOpen();

            dContext.DrawGeometry(visualTools.Brush, visualTools.Pen, g);
            dContext.Close();

            var uiElement = new DrawingVisualHost(dv);

            _layer.AddAdornment(AdornmentPositioningBehavior.TextRelative, span, new object(), uiElement, null);
        }
        private void DrawHighlight(Geometry g, VisualToolset visualTools, SnapshotSpan span) {
            if (g.CanFreeze) {
                g.Freeze();
            }

            var dv = new DrawingVisual();
            DrawingContext dContext = dv.RenderOpen();
            dContext.DrawGeometry(visualTools.Brush, visualTools.Pen, g);
            dContext.Close();

            var uiElement = new DrawingVisualHost(dv);

            _layer.AddAdornment(AdornmentPositioningBehavior.TextRelative, span, new object(), uiElement, null);
        }