Beispiel #1
0
        public void PreDrawingLinesOnCanvas(object hostVisual)
        {
            VisualTarget  visualTarget  = new VisualTarget((HostVisual)hostVisual);
            DrawingCanvas drawingCanvas = new DrawingCanvas();

            drawingCanvas.Arrange(new Rect(0, 0, CanvasWidth, CanvasHeight));
            visualTarget.RootVisual = drawingCanvas;
            DrawingLinesOnCanvas(drawingCanvas);
            System.Windows.Threading.Dispatcher.Run();
        }