private DrawingVisual visual; private DrawingContext drawingContext; visual = new DrawingVisual(); drawingContext = visual.RenderOpen(); XpsDocument doc = new XpsDocument(PackageName,FileAccess.ReadWrite); XpsDocumentWriter writer = XpsDocument.CreateXpsDocumentWriter(doc); drawingContext.DrawText(new FormattedText(text,CultureInfo.GetCultureInfo("en-us"), FlowDirection.LeftToRight,new Typeface("Microsoft Sans Serif"), size,brush),new Point(36,36)); writer.Write(visual); Viewer.Document = doc.GetFixedDocumentSequence();
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)